Lcd wrote: > On 1 July 2014, Christian Brabandt <[email protected]> wrote: > [...] > > BTW: what happens to the highlighting after one changes the > > buffer? E.g. if I add a matchaddpos() at line 5, column 5 and > > afterwards add a line below 3, will then line 6, column 5 be > > highlighted or line 5? Both could be useful, I suppose... > > As it is now, the highlight stays at line 5, column 5. I think > there was a recent patch to make it move along with the text it > highlights (which would be a lot more useful, IMO).
No, the position is fixed. I'm not sure how useful it is to adjust the positions for inserted/deleted lines. First of all, if the text is changed, the positions may be invalid anyway, e.g., when highlighting () pairs inserting/deleting a ( or ) requires updating the positions. And keeping the column updated when inserting/deleting characters is very complicated, it's not even done for marks. Better just make clear the position is fixed and the script writer will have to handle text changes. -- No letters of the alphabet were harmed in the creation of this message. /// 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.
