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
So the essential part is using synID() for the skip expression. > > 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. I suppose the caching that the syntax HL does causes problems. Are any of the patterns used in the relevant syntax multi-line? -- Why I like vim: > I like VIM because, when I ask a question in this newsgroup, I get a > one-line answer. With xemacs, I get a 1Kb lisp script with bugs in it ;-) /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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.
