Hi Bram!

On Di, 12 Jan 2016, Bram Moolenaar wrote:

> 
> Christian Brabandt wrote:
> 
> > Bram,
> > this patch fies an issue reported by David Fishburn about a misbehaving 
> > searchpairpos(). I traced it back to syntax.c and I think what happens 
> > is, that Vim gets confused about the current syntax stack. I added a 
> > newstyle test, that lets the problem reproduce, given the plugin from 
> > David. I hope it is okay, to include some plugins for the tests.
> > 
> > I have fixed that behaviour for David back in October and haven't heard 
> > from him back since then. I think, this patch should be included for a 
> > possible vim 7.5.
> > CC'ing David for his opinion.
> 
> I can't find a note about the original problem, what was it?

https://groups.google.com/d/msg/vim_use/TVVMB4UHZWI/OcRpYbqdAQAJ

> Including a whole plugin to test with is not a good idea.
> Knowing what you fixed, I'm sure you can come up with a much simpler
> test.

Not easily, since apparently it depends on complex syntax rules and does 
not seem to be triggered easily without the plugin.

I think the problem is, that the searchpair() function could move the 
cursor to some arbitrary column, but the skip expression would not 
consider certain syntax attributes, because next_match_idx remembers 
possible matches for a different column.
It always triggered only the first time when using searchpairpos(), 
because the second time you issue it, current_col would be > col and 
then Vim would call syntax_start() again, which eventually would reset 
next_match_id again to -1.

Best,
Christian
-- 
Was ist ein Vampir in der A-Klasse? Ein Drakuller!

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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui