]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/vim-7.0-spellfile-1.patch
Fix vnstat directory creation
[people/pmueller/ipfire-2.x.git] / src / patches / vim-7.0-spellfile-1.patch
CommitLineData
90d372c4
MT
1Submitted By: Alexander E. Patrakov
2Date: 2006-07-25
3Initial Package Version: 7.0
4Origin: Alexander E. Patrakov
5Upstream Status: Sent
6Description: Allows downloading spellfiles via HTTP,
7thus 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