Merge pull request #21868 from zeertzjq/vim-9.0.1214

vim-patch:9.0.{1214,1215}
This commit is contained in:
zeertzjq 2023-01-18 07:21:57 +08:00 committed by GitHub
commit 847e603554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -2852,7 +2852,7 @@ bool checkforcmd(char **pp, const char *cmd, int len)
break; break;
} }
} }
if (i >= len && !isalpha((uint8_t)(*pp)[i])) { if (i >= len && !ASCII_ISALPHA((*pp)[i])) {
*pp = skipwhite(*pp + i); *pp = skipwhite(*pp + i);
return true; return true;
} }

View File

@ -1106,7 +1106,7 @@ int do_set(char *arg, int opt_flags)
char *errmsg = NULL; char *errmsg = NULL;
char *startarg = arg; // remember for error message 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)) { && !(opt_flags & OPT_MODELINE)) {
// ":set all" show all options. // ":set all" show all options.
// ":set all&" set all options to their default value. // ":set all&" set all options to their default value.

View File

@ -1768,7 +1768,7 @@ int path_with_url(const char *fname)
// non-URL text. // non-URL text.
// first character must be alpha // first character must be alpha
if (!isalpha((uint8_t)(*fname))) { if (!ASCII_ISALPHA(*fname)) {
return 0; return 0;
} }
@ -1777,7 +1777,7 @@ int path_with_url(const char *fname)
} }
// check body: alpha or dash // 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 // check last char is not a dash
if (p[-1] == '-') { if (p[-1] == '-') {

View File

@ -629,6 +629,7 @@ func Test_WinScrolled_diff()
\ }, event) \ }, event)
call StopVimInTerminal(buf) call StopVimInTerminal(buf)
call delete('XscrollEvent')
endfunc endfunc
func Test_WinClosed() func Test_WinClosed()