diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-11 14:41:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-11 14:41:55 +0200 |
commit | b31a3acce13231643b006988c1ce76b8a12b2982 (patch) | |
tree | 47a08d8aa4afd173ae36e70f24c35107722c0556 /src/ex_cmds.c | |
parent | 51e9fbf1c7ab4ec61ac959d72d5d5cb0a0b356bb (diff) |
patch 8.1.0270: checking for a Tab in a line could be fasterv8.1.0270
Problem: Checking for a Tab in a line could be faster.
Solution: Use strchr() instead of strrchr(). (closes #3312)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 2c57776404..bee50c5955 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -281,7 +281,7 @@ linelen(int *has_tab) *last = NUL; len = linetabsize(line); /* get line length */ if (has_tab != NULL) /* check for embedded TAB */ - *has_tab = (vim_strrchr(first, TAB) != NULL); + *has_tab = (vim_strchr(first, TAB) != NULL); *last = save; return len; |