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:
Jurica Bradarić
2019-10-06 05:35:48 +02:00
committed by Justin M. Keyes
parent 1396cc9abb
commit fe074611cd
14 changed files with 143 additions and 42 deletions

View File

@@ -929,7 +929,7 @@ void handle_swap_exists(bufref_T *old_curbuf)
// User selected Recover at ATTENTION prompt.
msg_scroll = true;
ml_recover();
ml_recover(false);
MSG_PUTS("\n"); // don't overwrite the last message
cmdline_row = msg_row;
do_modelines(0);
@@ -4629,7 +4629,8 @@ do_arg_all(
if (i < alist->al_ga.ga_len
&& (AARGLIST(alist)[i].ae_fnum == buf->b_fnum
|| path_full_compare(alist_name(&AARGLIST(alist)[i]),
buf->b_ffname, true) & kEqualFiles)) {
buf->b_ffname,
true, true) & kEqualFiles)) {
int weight = 1;
if (old_curtab == curtab) {