Skip to content

Commit b31a3ac

Browse files
committed
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)
1 parent 51e9fbf commit b31a3ac

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/ex_cmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ linelen(int *has_tab)
281281
*last = NUL;
282282
len = linetabsize(line); /* get line length */
283283
if (has_tab != NULL) /* check for embedded TAB */
284-
*has_tab = (vim_strrchr(first, TAB) != NULL);
284+
*has_tab = (vim_strchr(first, TAB) != NULL);
285285
*last = save;
286286

287287
return len;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ static char *(features[]) =
794794

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
270,
797799
/**/
798800
269,
799801
/**/

0 commit comments

Comments
 (0)