0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.3.1175

Problem:    Using isalpha() and isalnum() can be slow.
Solution:   Use range checks. (Mike Williams)
This commit is contained in:
Bram Moolenaar
2013-06-12 17:12:24 +02:00
parent 81c40c507c
commit 2d473ab932
3 changed files with 10 additions and 8 deletions

View File

@@ -3120,7 +3120,7 @@ modifier_len(cmd)
for (j = 0; p[j] != NUL; ++j)
if (p[j] != cmdmods[i].name[j])
break;
if (!isalpha(p[j]) && j >= cmdmods[i].minlen
if (!ASCII_ISALPHA(p[j]) && j >= cmdmods[i].minlen
&& (p == cmd || cmdmods[i].has_count))
return j + (int)(p - cmd);
}