mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 00:46:30 +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
@@ -2031,7 +2031,8 @@ char_u *did_set_spelllang(win_T *wp)
|
||||
|
||||
// Check if we loaded this language before.
|
||||
for (slang = first_lang; slang != NULL; slang = slang->sl_next) {
|
||||
if (path_full_compare(lang, slang->sl_fname, false) == kEqualFiles) {
|
||||
if (path_full_compare(lang, slang->sl_fname, false, true)
|
||||
== kEqualFiles) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2076,7 +2077,7 @@ char_u *did_set_spelllang(win_T *wp)
|
||||
// Loop over the languages, there can be several files for "lang".
|
||||
for (slang = first_lang; slang != NULL; slang = slang->sl_next) {
|
||||
if (filename
|
||||
? path_full_compare(lang, slang->sl_fname, false) == kEqualFiles
|
||||
? path_full_compare(lang, slang->sl_fname, false, true) == kEqualFiles
|
||||
: STRICMP(lang, slang->sl_name) == 0) {
|
||||
region_mask = REGION_ALL;
|
||||
if (!filename && region != NULL) {
|
||||
@@ -2129,7 +2130,7 @@ char_u *did_set_spelllang(win_T *wp)
|
||||
for (c = 0; c < ga.ga_len; ++c) {
|
||||
p = LANGP_ENTRY(ga, c)->lp_slang->sl_fname;
|
||||
if (p != NULL
|
||||
&& path_full_compare(spf_name, p, false) == kEqualFiles) {
|
||||
&& path_full_compare(spf_name, p, false, true) == kEqualFiles) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2139,7 +2140,8 @@ char_u *did_set_spelllang(win_T *wp)
|
||||
|
||||
// Check if it was loaded already.
|
||||
for (slang = first_lang; slang != NULL; slang = slang->sl_next) {
|
||||
if (path_full_compare(spf_name, slang->sl_fname, false) == kEqualFiles) {
|
||||
if (path_full_compare(spf_name, slang->sl_fname, false, true)
|
||||
== kEqualFiles) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user