Files
neovim/runtime
Justin M. Keyes b9c9283f72 spellfile.vim: improve error message for missing spellfile
Problem:  If spellfile is missing, then "set spell" in modeline/sandbox
          fails with a non-obvious error.
Solution: Check for sandbox early and give a meaningful error.
          Fixes #11359

Test case:
    # test.latex has `% vim: set spelllang=hu:`
    # no spell file for `hu` yet!
    nvim -u NORC --cmd 'autocmd FileType tex setlocal spell' --cmd 'set modeline' test.latex

Before:
    No spell file for "hu" in utf-8
    Download it?
    Downloading hu.utf-8.spl...
    Error detected while processing /usr/local/share/nvim/runtime/autoload/netrw.vim:
    line  583:
    E12: Command not allowed from exrc/vimrc in current dir or tag search: au WinEnter *^Iif &ft == "netrw"|call s:NetrwInsureWinVars()|endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread[13]..netrw#NetRead[4]..<SNR>67_NetrwOptionsSave:
    line   66:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile[60]..spellfile#Nread:
    line   13:
    E171: Missing :endif
    Error detected while processing function spellfile#LoadFile:
    line   60:
    E171: Missing :endif
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search

After:
    Error detected while processing function spellfile#LoadFile:
    line    5:
    E605: Exception not caught: Cannot download spellfile in sandbox/modeline. Try ":set spell" from the cmdline.
    Error detected while processing modelines:
    line    1:
    E12: Command not allowed from exrc/vimrc in current dir or tag search
2019-11-10 12:35:45 -08:00
..
2019-08-02 16:20:23 +02:00
2018-10-28 14:18:21 +01:00
2017-11-07 01:16:42 +01:00
2014-12-19 15:28:49 -05:00
2018-01-15 23:58:52 +01:00
2019-09-06 18:44:52 -07:00
2019-08-02 16:20:22 +02:00
2019-05-09 23:32:57 +02:00
2019-07-29 20:50:07 +02:00
2019-01-04 02:17:23 +01:00
2019-09-06 18:35:06 -07:00
2019-07-29 20:50:07 +02:00
2019-07-29 20:50:07 +02:00
2019-09-15 19:44:11 -07:00
2017-01-31 02:02:09 +01:00
2014-07-29 02:12:31 +00:00
2019-07-29 20:50:07 +02:00
2019-09-06 18:35:06 -07:00