diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-06-12 17:12:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-06-12 17:12:24 +0200 |
commit | 2d473ab932b5c46a77715ea507de3990b70d96c1 (patch) | |
tree | 18e5157ad482f7d6047b9081b7ab62a68fe66be1 /src/ex_docmd.c | |
parent | 81c40c507c69ab0c3aede3ee14a2ba76c20c4595 (diff) |
updated for version 7.3.1175v7.3.1175
Problem: Using isalpha() and isalnum() can be slow.
Solution: Use range checks. (Mike Williams)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 3efb3814b5..fe711d79d3 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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); } |