From 8c344378b8c22a0d47db294daa7483763c75fba6 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 18 Jan 2023 06:27:26 +0800 Subject: vim-patch:9.0.1214: file left behind after running tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: File left behind after running tests. Solution: Delete the file. (Dominique Pellé, closes vim/vim#11839) https://github.com/vim/vim/commit/541c87c808df91b55e51fedc4987152a3edfe80d Co-authored-by: Dominique Pelle --- src/nvim/testdir/test_autocmd.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 704ff6ec55..df3123c21a 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -629,6 +629,7 @@ func Test_WinScrolled_diff() \ }, event) call StopVimInTerminal(buf) + call delete('XscrollEvent') endfunc func Test_WinClosed() -- cgit From 9a2dd52a6a2a17ae85102d738ab3620ef978d448 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 18 Jan 2023 06:27:45 +0800 Subject: vim-patch:9.0.1215: using isalpha() adds dependency on current locale Problem: Using isalpha() adds dependency on current locale. Solution: Do not use isalpha() for recognizing a URL or the end of an Ex command. (closes vim/vim#11835) https://github.com/vim/vim/commit/0ef9a5c09482649cf0cc6768ed6fc640b4ed2a0a --- src/nvim/ex_docmd.c | 2 +- src/nvim/option.c | 2 +- src/nvim/path.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 896130debf..d4f1169daf 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2852,7 +2852,7 @@ bool checkforcmd(char **pp, const char *cmd, int len) break; } } - if (i >= len && !isalpha((uint8_t)(*pp)[i])) { + if (i >= len && !ASCII_ISALPHA((*pp)[i])) { *pp = skipwhite(*pp + i); return true; } diff --git a/src/nvim/option.c b/src/nvim/option.c index 0c2a2f7060..227001d556 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1106,7 +1106,7 @@ int do_set(char *arg, int opt_flags) char *errmsg = NULL; char *startarg = arg; // remember for error message - if (strncmp(arg, "all", 3) == 0 && !isalpha((uint8_t)arg[3]) + if (strncmp(arg, "all", 3) == 0 && !ASCII_ISALPHA(arg[3]) && !(opt_flags & OPT_MODELINE)) { // ":set all" show all options. // ":set all&" set all options to their default value. diff --git a/src/nvim/path.c b/src/nvim/path.c index afc0563498..da3659b8b8 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1768,7 +1768,7 @@ int path_with_url(const char *fname) // non-URL text. // first character must be alpha - if (!isalpha((uint8_t)(*fname))) { + if (!ASCII_ISALPHA(*fname)) { return 0; } @@ -1777,7 +1777,7 @@ int path_with_url(const char *fname) } // check body: alpha or dash - for (p = fname + 1; (isalpha((uint8_t)(*p)) || (*p == '-')); p++) {} + for (p = fname + 1; (ASCII_ISALPHA(*p) || (*p == '-')); p++) {} // check last char is not a dash if (p[-1] == '-') { -- cgit