Skip to content

Commit

Permalink
patch 8.0.1363: recovering does not work when swap file ends in .stz
Browse files Browse the repository at this point in the history
Problem:    Recovering does not work when swap file ends in .stz.
Solution:   Check for all possible swap file names. (Elfling, closes #2395,
            closes #2396)
  • Loading branch information
brammool committed Dec 2, 2017
1 parent a7c54cf commit af903e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/memline.c
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -771,6 +771,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1363,
/**/
1362,
/**/
Expand Down

0 comments on commit af903e5

Please sign in to comment.