mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +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
@@ -6708,17 +6708,18 @@ static void ex_preserve(exarg_T *eap)
|
||||
/// ":recover".
|
||||
static void ex_recover(exarg_T *eap)
|
||||
{
|
||||
/* Set recoverymode right away to avoid the ATTENTION prompt. */
|
||||
recoverymode = TRUE;
|
||||
// Set recoverymode right away to avoid the ATTENTION prompt.
|
||||
recoverymode = true;
|
||||
if (!check_changed(curbuf, (p_awa ? CCGD_AW : 0)
|
||||
| CCGD_MULTWIN
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD)
|
||||
|
||||
&& (*eap->arg == NUL
|
||||
|| setfname(curbuf, eap->arg, NULL, TRUE) == OK))
|
||||
ml_recover();
|
||||
recoverymode = FALSE;
|
||||
|| setfname(curbuf, eap->arg, NULL, true) == OK)) {
|
||||
ml_recover(true);
|
||||
}
|
||||
recoverymode = false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user