Mercurial > vim
changeset 12975:e311187347c1 v8.0.1363
patch 8.0.1363: recovering does not work when swap file ends in .stz
commit https://github.com/vim/vim/commit/af903e5d490ec9c6c49079f67de7e92e3c35a725
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 2 15:11:22 2017 +0100
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 https://github.com/vim/vim/issues/2395,
closes #2396)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Dec 2017 15:15:05 +0100 |
parents | f7e78e142aa8 |
children | 1a4d7b63c490 |
files | src/memline.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;