0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1231: asking about existing swap file unnecessarily

Problem:    Asking about existing swap file unnecessarily.
Solution:   When it is safe, delete the swap file.  Remove
            HAS_SWAP_EXISTS_ACTION, it is always defined. (closes #1237)
This commit is contained in:
Bram Moolenaar
2019-04-28 22:25:38 +02:00
parent afde13b62b
commit 67cf86bfff
13 changed files with 194 additions and 74 deletions

View File

@@ -4258,9 +4258,7 @@ do_ecmd(
topline = curwin->w_topline;
if (!oldbuf) /* need to read the file */
{
#if defined(HAS_SWAP_EXISTS_ACTION)
swap_exists_action = SEA_DIALOG;
#endif
curbuf->b_flags |= BF_CHECK_RO; /* set/reset 'ro' flag */
/*
@@ -4273,11 +4271,9 @@ do_ecmd(
(void)open_buffer(FALSE, eap, readfile_flags);
#endif
#if defined(HAS_SWAP_EXISTS_ACTION)
if (swap_exists_action == SEA_QUIT)
retval = FAIL;
handle_swap_exists(&old_curbuf);
#endif
}
else
{