]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.226 v7.3.226
authorBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2011 02:54:21 +0000 (04:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 19 Jun 2011 02:54:21 +0000 (04:54 +0200)
Problem:    On a 64 bit system "syn sync fromstart" is very slow.  (Bjorn
            Steinbrink)
Solution:   Store the state when starting to parse from the first line.

src/syntax.c
src/version.c

index a9a2e862f34e24605fdd92fe59a14734aba0a90c..f3cb71ed6515d5f8466fa4b969220613fa839193 100644 (file)
@@ -559,7 +559,13 @@ syntax_start(wp, lnum)
     if (INVALID_STATE(&current_state))
     {
        syn_sync(wp, lnum, last_valid);
-       first_stored = current_lnum + syn_block->b_syn_sync_minlines;
+       if (current_lnum == 1)
+           /* First line is always valid, no matter "minlines". */
+           first_stored = 1;
+       else
+           /* Need to parse "minlines" lines before state can be considered
+            * valid to store. */
+           first_stored = current_lnum + syn_block->b_syn_sync_minlines;
     }
     else
        first_stored = current_lnum;
index f169b56a301668e8ba3fc7195ca94577504ea651..746a145ab0a0be7b23782b5b0d73748519ae0027 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    226,
 /**/
     225,
 /**/