]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/vim-7.0-spellfile-1.patch
Merge branch 'master' into next
[people/pmueller/ipfire-2.x.git] / src / patches / vim-7.0-spellfile-1.patch
1 Submitted By: Alexander E. Patrakov
2 Date: 2006-07-25
3 Initial Package Version: 7.0
4 Origin: Alexander E. Patrakov
5 Upstream Status: Sent
6 Description: Allows downloading spellfiles via HTTP,
7 thus reverting the negative effect of ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.010
8
9 --- vim70/runtime/autoload/spellfile.vim.orig 2006-07-25 19:05:38.000000000 +0600
10 +++ vim70/runtime/autoload/spellfile.vim 2006-07-25 19:39:32.000000000 +0600
11 @@ -110,9 +110,14 @@
12 endif
13 endfunc
14
15 -" Read "fname" from the ftp server.
16 +" Read "fname" from the server.
17 function! spellfile#Nread(fname)
18 - let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
19 - let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
20 - exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
21 + if strpart(g:spellfile_URL, 0, 6) == 'ftp://'
22 + " Avoid the password prompt by providing the default username and password
23 + let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
24 + let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '')
25 + exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"'
26 + else
27 + exe 'Nread "' . g:spellfile_URL . '/' . a:fname . '"'
28 + endif
29 endfunc