1
0
forked from aniani/vim

updated for version 7.3.226

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.
This commit is contained in:
Bram Moolenaar 2011-06-19 04:54:21 +02:00
parent 978287b8f8
commit d6761c3cdf
2 changed files with 9 additions and 1 deletions

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

View File

@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
226,
/**/
225,
/**/