mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
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)
99499b1c05
This commit is contained in:

committed by
Justin M. Keyes

parent
1396cc9abb
commit
fe074611cd
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user