• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisãoaa7c51f81f46cc5379386ac622a5ba44aae1c4dc (tree)
Hora2008-01-14 01:40:19
Autorvimboss
Commitervimboss

Mensagem de Log

updated for version 7.1-227

Mudança Sumário

Diff

diff -r 9c970d8681f4 -r aa7c51f81f46 src/syntax.c
--- a/src/syntax.c Sun Jan 13 16:12:10 2008 +0000
+++ b/src/syntax.c Sun Jan 13 16:40:19 2008 +0000
@@ -372,7 +372,7 @@
372372 static int syn_stack_cleanup __ARGS((void));
373373 static void syn_stack_free_entry __ARGS((buf_T *buf, synstate_T *p));
374374 static synstate_T *syn_stack_find_entry __ARGS((linenr_T lnum));
375-static synstate_T *store_current_state __ARGS((synstate_T *sp));
375+static synstate_T *store_current_state __ARGS((void));
376376 static void load_current_state __ARGS((synstate_T *from));
377377 static void invalidate_current_state __ARGS((void));
378378 static int syn_stack_equal __ARGS((synstate_T *sp));
@@ -464,7 +464,7 @@
464464 synstate_T *p;
465465 synstate_T *last_valid = NULL;
466466 synstate_T *last_min_valid = NULL;
467- synstate_T *sp, *prev;
467+ synstate_T *sp, *prev = NULL;
468468 linenr_T parsed_lnum;
469469 linenr_T first_stored;
470470 int dist;
@@ -502,7 +502,7 @@
502502 if (!current_state_stored)
503503 {
504504 ++current_lnum;
505- (void)store_current_state(NULL);
505+ (void)store_current_state();
506506 }
507507
508508 /*
@@ -558,7 +558,6 @@
558558 dist = 999999;
559559 else
560560 dist = syn_buf->b_ml.ml_line_count / (syn_buf->b_sst_len - Rows) + 1;
561- prev = syn_stack_find_entry(current_lnum);
562561 while (current_lnum < lnum)
563562 {
564563 syn_start_line();
@@ -573,9 +572,13 @@
573572 * equal to the current state. If so, then validate all saved
574573 * states that depended on a change before the parsed line. */
575574 if (prev == NULL)
575+ prev = syn_stack_find_entry(current_lnum - 1);
576+ if (prev == NULL)
576577 sp = syn_buf->b_sst_first;
577578 else
578- sp = prev->sst_next;
579+ sp = prev;
580+ while (sp != NULL && sp->sst_lnum < current_lnum)
581+ sp = sp->sst_next;
579582 if (sp != NULL
580583 && sp->sst_lnum == current_lnum
581584 && syn_stack_equal(sp))
@@ -601,7 +604,7 @@
601604 else if (prev == NULL
602605 || current_lnum == lnum
603606 || current_lnum >= prev->sst_lnum + dist)
604- prev = store_current_state(prev);
607+ prev = store_current_state();
605608 }
606609
607610 /* This can take a long time: break when CTRL-C pressed. The current
@@ -1353,17 +1356,13 @@
13531356 * The current state must be valid for the start of the current_lnum line!
13541357 */
13551358 static synstate_T *
1356-store_current_state(sp)
1357- synstate_T *sp; /* at or before where state is to be saved or
1358- NULL */
1359+store_current_state()
13591360 {
13601361 int i;
13611362 synstate_T *p;
13621363 bufstate_T *bp;
13631364 stateitem_T *cur_si;
1364-
1365- if (sp == NULL)
1366- sp = syn_stack_find_entry(current_lnum);
1365+ synstate_T *sp = syn_stack_find_entry(current_lnum);
13671366
13681367 /*
13691368 * If the current state contains a start or end pattern that continues
@@ -1667,7 +1666,7 @@
16671666 * Store the current state in b_sst_array[] for later use.
16681667 */
16691668 ++current_lnum;
1670- (void)store_current_state(NULL);
1669+ (void)store_current_state();
16711670 }
16721671 }
16731672
diff -r 9c970d8681f4 -r aa7c51f81f46 src/version.c
--- a/src/version.c Sun Jan 13 16:12:10 2008 +0000
+++ b/src/version.c Sun Jan 13 16:40:19 2008 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 227,
671+/**/
670672 226,
671673 /**/
672674 225,
Show on old repository browser