Files
bpfire/src/patches/vim-7.0-spellfile-1.patch
ms 90d372c4b4 Naechster Schritt im LFS.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@300 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-10-01 15:04:23 +00:00

30 lines
1.2 KiB
Diff

Submitted By: Alexander E. Patrakov
Date: 2006-07-25
Initial Package Version: 7.0
Origin: Alexander E. Patrakov
Upstream Status: Sent
Description: Allows downloading spellfiles via HTTP,
thus reverting the negative effect of ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.010
--- vim70/runtime/autoload/spellfile.vim.orig 2006-07-25 19:05:38.000000000 +0600
+++ vim70/runtime/autoload/spellfile.vim 2006-07-25 19:39:32.000000000 +0600
@@ -110,9 +110,14 @@
endif
endfunc
-" Read "fname" from the ftp server.
+" Read "fname" from the server.
function! spellfile#Nread(fname)
- let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
- let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
- exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
+ if strpart(g:spellfile_URL, 0, 6) == 'ftp://'
+ " Avoid the password prompt by providing the default username and password
+ let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
+ let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
+ exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
+ else
+ exe 'Nread "' . g:spellfile_URL . '/' . a:fname . '"'
+ endif
endfunc