Skip to content

Commit af903e5

Browse files
committed
patch 8.0.1363: recovering does not work when swap file ends in .stz
Problem: Recovering does not work when swap file ends in .stz. Solution: Check for all possible swap file names. (Elfling, closes #2395, closes #2396)
1 parent a7c54cf commit af903e5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/memline.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ ml_recover(void)
11391139
attr = HL_ATTR(HLF_E);
11401140

11411141
/*
1142-
* If the file name ends in ".s[uvw][a-z]" we assume this is the swap file.
1142+
* If the file name ends in ".s[a-w][a-z]" we assume this is the swap file.
11431143
* Otherwise a search is done to find the swap file(s).
11441144
*/
11451145
fname = curbuf->b_fname;
@@ -1153,7 +1153,8 @@ ml_recover(void)
11531153
STRNICMP(fname + len - 4, ".s", 2)
11541154
#endif
11551155
== 0
1156-
&& vim_strchr((char_u *)"UVWuvw", fname[len - 2]) != NULL
1156+
&& vim_strchr((char_u *)"abcdefghijklmnopqrstuvw",
1157+
TOLOWER_ASC(fname[len - 2])) != NULL
11571158
&& ASCII_ISALPHA(fname[len - 1]))
11581159
{
11591160
directly = TRUE;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ static char *(features[]) =
771771

772772
static int included_patches[] =
773773
{ /* Add new patch number below this line */
774+
/**/
775+
1363,
774776
/**/
775777
1362,
776778
/**/

0 commit comments

Comments
 (0)