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
|
old
|
new
|
|
| 110 | 110 | endif |
| 111 | 111 | endfunc |
| 112 | 112 | |
| 113 | | " Read "fname" from the ftp server. |
| | 113 | " Read "fname" from the server. |
| 114 | 114 | function! spellfile#Nread(fname) |
| 115 | | let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') |
| 116 | | let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') |
| 117 | | exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' |
| | 115 | if strpart(g:spellfile_URL, 0, 6) == 'ftp://' |
| | 116 | " Avoid the password prompt by providing the default username and password |
| | 117 | let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '') |
| | 118 | let dir = substitute(g:spellfile_URL, 'ftp://[^/]*/\(.*\)', '\1', '') |
| | 119 | exe 'Nread "' . machine . ' anonymous vim7user ' . dir . '/' . a:fname . '"' |
| | 120 | else |
| | 121 | exe 'Nread "' . g:spellfile_URL . '/' . a:fname . '"' |
| | 122 | endif |
| 118 | 123 | endfunc |