0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0270: checking for a Tab in a line could be faster

Problem:    Checking for a Tab in a line could be faster.
Solution:   Use strchr() instead of strrchr(). (closes #3312)
This commit is contained in:
Bram Moolenaar
2018-08-11 14:41:55 +02:00
parent 51e9fbf1c7
commit b31a3acce1
2 changed files with 3 additions and 1 deletions

View File

@@ -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;