1
0
forked from aniani/vim

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

@@ -684,15 +684,13 @@ readfile(
#endif
}
#if defined(HAS_SWAP_EXISTS_ACTION)
/* If "Quit" selected at ATTENTION dialog, don't load the file */
// If "Quit" selected at ATTENTION dialog, don't load the file
if (swap_exists_action == SEA_QUIT)
{
if (!read_buffer && !read_stdin)
close(fd);
return FAIL;
}
#endif
++no_wait_return; /* don't wait for return yet */