mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -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:
parent
51e9fbf1c7
commit
b31a3acce1
@ -281,7 +281,7 @@ linelen(int *has_tab)
|
|||||||
*last = NUL;
|
*last = NUL;
|
||||||
len = linetabsize(line); /* get line length */
|
len = linetabsize(line); /* get line length */
|
||||||
if (has_tab != NULL) /* check for embedded TAB */
|
if (has_tab != NULL) /* check for embedded TAB */
|
||||||
*has_tab = (vim_strrchr(first, TAB) != NULL);
|
*has_tab = (vim_strchr(first, TAB) != NULL);
|
||||||
*last = save;
|
*last = save;
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
|
@ -794,6 +794,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
270,
|
||||||
/**/
|
/**/
|
||||||
269,
|
269,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user