[vim/vim] 'Search' highlight has lower priority than 'Visual' (#8134)

68 views
Skip to first unread message

Sergey Vlasov

unread,
Apr 21, 2021, 7:56:33 AM4/21/21
to vim/vim, Subscribed

Describe the bug
When doing visual selection over search results, highlight of search results disappear.

To Reproduce
Detailed steps to reproduce the behavior:

  1. Run vim -g -u NONE +'set hlsearch'
  2. Open some text file and search for something. Results will be highlighted with yellow.
  3. Start selecting the lines that contain the search results.
  4. Search highlight is overruled by Visual.

Expected behavior
Search highlight is not overruled by Visual.

Screenshots
visual

Environment (please complete the following information):

  • Vim 8.2.2650
  • OS: Ubuntu 20.04
  • Terminal: GUI


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
Apr 21, 2021, 8:52:34 AM4/21/21
to vim/vim, Subscribed

It is correct that the Visual highlighting has higher priority, since it's temporarily while search highlighting stays around. It would also be difficult to see the Visual area if there are many search matches (e.g. whole lines).
However, I notice that the highlight is overruled, while it could be combined. You could make Search highlight bold, then it would still be visible.

Bram Moolenaar

unread,
Apr 21, 2021, 9:12:32 AM4/21/21
to vim/vim, Subscribed

Closed #8134 via 2d5f385.

Reply all
Reply to author
Forward
0 new messages