summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-12-02 15:11:22 +0100
committerBram Moolenaar <Bram@vim.org>2017-12-02 15:11:22 +0100
commitaf903e5d490ec9c6c49079f67de7e92e3c35a725 (patch)
tree3ee2ea74ec8efadfa0169789a0df3854e4a4bf4f
parenta7c54cfcf825e8e99db03f4ccdb1a32cd0714c52 (diff)
downloadvim-git-8.0.1363.tar.gz
patch 8.0.1363: recovering does not work when swap file ends in .stzv8.0.1363
Problem: Recovering does not work when swap file ends in .stz. Solution: Check for all possible swap file names. (Elfling, closes #2395, closes #2396)
-rw-r--r--src/memline.c5
-rw-r--r--src/version.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/memline.c b/src/memline.c
index 59393ae1d..07721ee1a 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1139,7 +1139,7 @@ ml_recover(void)
attr = HL_ATTR(HLF_E);
/*
- * If the file name ends in ".s[uvw][a-z]" we assume this is the swap file.
+ * If the file name ends in ".s[a-w][a-z]" we assume this is the swap file.
* Otherwise a search is done to find the swap file(s).
*/
fname = curbuf->b_fname;
@@ -1153,7 +1153,8 @@ ml_recover(void)
STRNICMP(fname + len - 4, ".s", 2)
#endif
== 0
- && vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL
+ && vim_strchr((char_u *)"abcdefghijklmnopqrstuvw",
+ TOLOWER_ASC(fname[len - 2])) != NULL
&& ASCII_ISALPHA(fname[len - 1]))
{
directly = TRUE;
diff --git a/src/version.c b/src/version.c
index 974ca2c03..8587b4dfe 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1363,
+/**/
1362,
/**/
1361,