From d6761c3cdf9d15c0f64253dcd8049ff9f25aa987 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 Jun 2011 04:54:21 +0200 Subject: [PATCH] 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. --- src/syntax.c | 8 +++++++- src/version.c | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/syntax.c b/src/syntax.c index a9a2e862f..f3cb71ed6 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -559,7 +559,13 @@ syntax_start(wp, lnum) if (INVALID_STATE(¤t_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; diff --git a/src/version.c b/src/version.c index f169b56a3..746a145ab 100644 --- a/src/version.c +++ b/src/version.c @@ -709,6 +709,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 226, /**/ 225, /**/ -- 2.50.1