summaryrefslogtreecommitdiff
path: root/runtime/autoload/spellfile.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/spellfile.vim')
-rw-r--r--runtime/autoload/spellfile.vim14
1 files changed, 13 insertions, 1 deletions
diff --git a/runtime/autoload/spellfile.vim b/runtime/autoload/spellfile.vim
index 6fedac190..b9e17f1f1 100644
--- a/runtime/autoload/spellfile.vim
+++ b/runtime/autoload/spellfile.vim
@@ -1,6 +1,6 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2007 May 06
+" Last Change: 2007 May 08
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
@@ -145,6 +145,12 @@ endfunc
" Read "fname" from the server.
function! spellfile#Nread(fname)
+ " We do our own error handling, don't want a window for it.
+ if exists("g:netrw_use_errorwindow")
+ let save_ew = g:netrw_use_errorwindow
+ endif
+ let g:netrw_use_errorwindow=0
+
if g:spellfile_URL =~ '^ftp://'
" for an ftp server use a default login and password to avoid a prompt
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
@@ -153,4 +159,10 @@ function! spellfile#Nread(fname)
else
exe 'Nread ' g:spellfile_URL . '/' . a:fname
endif
+
+ if exists("save_ew")
+ let g:netrw_use_errorwindow = save_ew
+ else
+ unlet g:netrw_use_errorwindow
+ endif
endfunc