Hi Bram. See my comments below.
2014-05-31 15:43 GMT+04:00 Bram Moolenaar <b...@moolenaar.net>: > > Alexey Radkov wrote: > > > This is a preliminary implementation of matchaddpos() that requires a > list > > of positions. See changes in matchparen.vim as example of using it. It > > works fine with the new matchparen. The implementation does not involve > > regexps and redraws only part of screen. Probably i missed something or > > something could be done simpler... > > > > The implementation extends struct matchitem_T adding 4 new elements: > > positions pos, current position index counter cur_pos and redrawing > > boundaries (top and bottom buffer lines which are calculated from pos). > If > > the idea of the patch is Ok then i will do some cleanup, docs etc., > > implement suggestions and send changes. > > Thanks for doing this. > > Please also write the documentation for matchaddpos(), so we can discuss > how it could be used. > Ok. > > It's also good to add tests. Although it might be difficult to check > that the highlighting shows up in the right place. You should be able > to do this with screenattr(). > Ok. > > I had a quick look at your changes, but it's not clear to me why you do > it the way you do. I would think next_search_hl() can work for both a > pattern and position, where a position would just use the one position > that is stores, instead of searching for a match. Thus just use one > list of matches, mixing both pattern matches and position matches. > Yes, you are right. By some reason i held in my head that next_search_hl() is only for regexps. Now i see that i can move next_search_hl_pos() into next_search_hl(). In this case it would look cleaner. > > > (Btw i do not understand difference between NUL and NULL, what should i > use > > and where?) > > NUL is an integer, used for a character, NULL is for a pointer. > NUL is defined by Vim, NULL is defined by C. > Ok, clear. > > -- > hundred-and-one symptoms of being an internet addict: > 241. You try to look for Net Search even when you're in File Manager. > > /// Bram Moolenaar -- b...@moolenaar.net -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.