Hi,

I'm trying to add C/C++ semantic highlighting to the Vim and encountered a 
problem(s) when using matchaddpos() function.

1. Let's say I've added some text on the line 5 to the match group, and then 
went into insert mode and added new line before line 5. The text moves to line 
6 and that messes up all highlighting. For example signs are staying in the 
correct positions in such cases, and this behavior is non-intuitive.

2. After a quick look to the matchadd source: it seems that matchaddpos is a 
adapted version of matchadd by pattern, and all matches are stored in the 
linked list.
This raises performance concerns; in a large files there can be several 
thousands semantic tokens and creating a match for each token can slow things 
down. Though I haven't tested it for large files yet.
So does matchaddpos intended for such heavy usage?

Regards,
Davit.

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