]> granicus.if.org Git - vim/commitdiff
patch 8.1.0270: checking for a Tab in a line could be faster v8.1.0270
authorBram Moolenaar <Bram@vim.org>
Sat, 11 Aug 2018 12:41:55 +0000 (14:41 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 11 Aug 2018 12:41:55 +0000 (14:41 +0200)
Problem:    Checking for a Tab in a line could be faster.
Solution:   Use strchr() instead of strrchr(). (closes #3312)

src/ex_cmds.c
src/version.c

index 2c577764041def1b92490a87298211cfe3cadcaa..bee50c5955f2f23c06d6dde6ed513250d45affba 100644 (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;
index da43f60323daa6c749bf9bb33ddf9dd09aa7bd1f..d92e7785c1e04d7bbfcfdd4727ca5ee2adf18b5e 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    270,
 /**/
     269,
 /**/