On 18/05/11 1:50 AM, Radek wrote:
Another strange behavior of syntax engine. Though it occurs only when
there's at least one syntax group with 'containedin=' attribute, it
affects even completely unrelated syntax items. As before, I feel that
an example will explain it best.

The patch below fixes it. I think the comment pretty much says it all. That it worked before/in other cases was a bit of an 'accident' really, due to the order in which various things were done.

Bram, I'm still awaiting your comments on the last syntax engine patch I sent through, to know whether I should rework it as I proposed or not.

I'd like to have these discussed, finalised and included sooner rather than later if possible, as I may not remember many details if too much time passes.

Cheers,

Ben.



diff --git a/src/syntax.c b/src/syntax.c
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2566,6 +2566,9 @@
 #endif
                update_si_attr(current_state.ga_len - 1);

+               /* nextgroup= should not match in the end pattern */
+               current_next_list = NULL;
+
                /* what matches next may be different now, clear it */
                next_match_idx = 0;
                next_match_col = MAXCOL;



--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui