qxxxb / vim-searchhi

Highlight the current search result differently
GNU General Public License v3.0
47 stars 6 forks source link

Matches are unwantedly re-highlighted after exiting insert mode #16

Closed mroavi closed 3 years ago

mroavi commented 3 years ago

I have this option enabled:

let g:searchhi_clear_all_autocmds = 'InsertEnter'

However, when I return to normal mode and hover over a word that matches the previous search, then all the matches are unwantedly re-highlighled:

Peek 2021-08-04 16-42_searchhi_insert_bug

Your plugin is great. The other plugins that try to implement this functionality flicker. Yours doesn't.

qxxxb commented 3 years ago

Thanks should be fixed now!

mroavi commented 3 years ago

Thanks a lot! There's only one small annoyance with the fix. Entering and leaving insert mode moves the cursor one character to the left. Ideally, it should stay in the same position. Is there an easy fix for that? If not, I'm very happy with the current fix!

qxxxb commented 3 years ago

I think the cursor moving to the left is the default behavior for Vim

mroavi commented 3 years ago

You are completely right. Thanks again for the cool plugin!!