Let me describe two scenarios.

First scenario:
I have made a visual selection of a text part and pressed 'Esc'. Now I
want to highlight this selection. So I do
:match ErrorMsg /\%'<\_.*\%'>/
This will highlight the text I had selected earlier. So far so good.
Now I make another visual selection in the same window. I see that
this new selection gets highlighted (which it should), but the
previously highlighted section is still highlighted. I would assume
that it would not be highlighted any more after I made another visual
selection, because the marks '< and '> have got redefined.

Second scenario:
I define two marks a and b in my text using ma and mb. Now I want to
highlight the text between these marks. So I do
:match ErrorMsg /\%'a\_.*\%'b/
This has the desired effect as the text between the marks a and b gets
highlighted. Now, I redefine these marks a and b to point to a
different part of the text. I see that the section highlighted earlier
is not highlighted any more (which is as I had expected), but the
section of the text between the new definition of marks a and b is not
highlighted either (I had expected that it would get highlighted).
However, if I do "echo getmatches()", the match command that I had
entered earlier still shows up.

So clearly, the behavior is different with the two types of marks. Is
this a bug?

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to