diff options
author | Jurica Bradarić <jbradaric@users.noreply.github.com> | 2019-10-06 05:35:48 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-10-05 20:35:48 -0700 |
commit | fe074611cd5b3319a3f639f68289df6a718e64eb (patch) | |
tree | f6709dc199d929ddeb75e98b74e74a894b4b5c6c /src/nvim/spellfile.c | |
parent | 1396cc9abb0dfcdbd9572706235aba59f7c3318a (diff) | |
download | rneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.tar.gz rneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.tar.bz2 rneovim-fe074611cd5b3319a3f639f68289df6a718e64eb.zip |
vim-patch:8.1.1371: cannot recover from a swap file #11081
Problem: Cannot recover from a swap file.
Solution: Do not expand environment variables in the swap file name.
Do not check the extension when we already know a file is a swap
file. (Ken Takata, closes 4415, closes vim/vim#4369)
https://github.com/vim/vim/commit/99499b1c05f85f83876b828eea3f6e14f0f407b4
Diffstat (limited to 'src/nvim/spellfile.c')
-rw-r--r-- | src/nvim/spellfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/spellfile.c b/src/nvim/spellfile.c index 01daafa09e..eeec5be120 100644 --- a/src/nvim/spellfile.c +++ b/src/nvim/spellfile.c @@ -1787,7 +1787,7 @@ spell_reload_one ( bool didit = false; for (slang = first_lang; slang != NULL; slang = slang->sl_next) { - if (path_full_compare(fname, slang->sl_fname, false) == kEqualFiles) { + if (path_full_compare(fname, slang->sl_fname, false, true) == kEqualFiles) { slang_clear(slang); if (spell_load_file(fname, NULL, slang, false) == NULL) // reloading failed, clear the language @@ -4719,7 +4719,8 @@ static void spell_make_sugfile(spellinfo_T *spin, char_u *wfname) // of the code for the soundfolding stuff. // It might have been done already by spell_reload_one(). for (slang = first_lang; slang != NULL; slang = slang->sl_next) { - if (path_full_compare(wfname, slang->sl_fname, false) == kEqualFiles) { + if (path_full_compare(wfname, slang->sl_fname, false, true) + == kEqualFiles) { break; } } |