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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user