]> granicus.if.org Git - vim/commitdiff
patch 8.0.1363: recovering does not work when swap file ends in .stz v8.0.1363
authorBram Moolenaar <Bram@vim.org>
Sat, 2 Dec 2017 14:11:22 +0000 (15:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 2 Dec 2017 14:11:22 +0000 (15:11 +0100)
Problem:    Recovering does not work when swap file ends in .stz.
Solution:   Check for all possible swap file names. (Elfling, closes #2395,
            closes #2396)

src/memline.c
src/version.c

index 59393ae1d09b84c7d5997c6323960a0741fc364e..07721ee1a4e0d173d61b7e1122535ae7e11ecac2 100644 (file)
@@ -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;
index 974ca2c032a0aed379fc897888d33368658d766e..8587b4dfeded08877ac155a3a703455259594643 100644 (file)
@@ -771,6 +771,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1363,
 /**/
     1362,
 /**/