• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Révisione8450dbf6f031f2727798a7d955e83dda7ba0288 (tree)
l'heure2007-08-22 00:29:56
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.1-086

Change Summary

Modification

diff -r b4d92472f168 -r e8450dbf6f03 src/syntax.c
--- a/src/syntax.c Tue Aug 21 13:29:28 2007 +0000
+++ b/src/syntax.c Tue Aug 21 15:29:56 2007 +0000
@@ -279,7 +279,8 @@
279279 */
280280 typedef struct state_item
281281 {
282- int si_idx; /* index of syntax pattern */
282+ int si_idx; /* index of syntax pattern or
283+ KEYWORD_IDX */
283284 int si_id; /* highlight group ID for keywords */
284285 int si_trans_id; /* idem, transparancy removed */
285286 int si_m_lnum; /* lnum of the match */
@@ -837,9 +838,18 @@
837838 current_lnum = end_lnum;
838839 break;
839840 }
840- spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
841- found_flags = spp->sp_flags;
842- found_match_idx = spp->sp_sync_idx;
841+ if (cur_si->si_idx < 0)
842+ {
843+ /* Cannot happen? */
844+ found_flags = 0;
845+ found_match_idx = KEYWORD_IDX;
846+ }
847+ else
848+ {
849+ spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
850+ found_flags = spp->sp_flags;
851+ found_match_idx = spp->sp_sync_idx;
852+ }
843853 found_current_lnum = current_lnum;
844854 found_current_col = current_col;
845855 found_m_endpos = cur_si->si_m_endpos;
@@ -2533,6 +2543,10 @@
25332543 stateitem_T *sip = &CUR_STATE(idx);
25342544 synpat_T *spp;
25352545
2546+ /* This should not happen... */
2547+ if (sip->si_idx < 0)
2548+ return;
2549+
25362550 spp = &(SYN_ITEMS(syn_buf)[sip->si_idx]);
25372551 if (sip->si_flags & HL_MATCH)
25382552 sip->si_id = spp->sp_syn_match_id;
@@ -2648,6 +2662,10 @@
26482662 lpos_T end_endpos;
26492663 int end_idx;
26502664
2665+ /* return quickly for a keyword */
2666+ if (sip->si_idx < 0)
2667+ return;
2668+
26512669 /* Don't update when it's already done. Can be a match of an end pattern
26522670 * that started in a previous line. Watch out: can also be a "keepend"
26532671 * from a containing item. */
@@ -2760,6 +2778,10 @@
27602778 char_u *line;
27612779 int had_match = FALSE;
27622780
2781+ /* just in case we are invoked for a keyword */
2782+ if (idx < 0)
2783+ return;
2784+
27632785 /*
27642786 * Check for being called with a START pattern.
27652787 * Can happen with a match that continues to the next line, because it
diff -r b4d92472f168 -r e8450dbf6f03 src/version.c
--- a/src/version.c Tue Aug 21 13:29:28 2007 +0000
+++ b/src/version.c Tue Aug 21 15:29:56 2007 +0000
@@ -667,6 +667,8 @@
667667 static int included_patches[] =
668668 { /* Add new patch number below this line */
669669 /**/
670+ 86,
671+/**/
670672 85,
671673 /**/
672674 84,
Afficher sur ancien navigateur de dépôt.