equalsraf / neovim-qt

Neovim client library and GUI, in Qt5.
https://github.com/equalsraf/neovim-qt/wiki
ISC License
1.85k stars 171 forks source link

nohlsearch incorrectly highlights everything #993

Open bugnano opened 2 years ago

bugnano commented 2 years ago

When searching for a string, hlsearch correctly highlights all the occurrences of the search pattern

Normal hlsearch

But, when I hit CTRL-L (the default in neovim for nohlsearch), instead of simply removing the highlight from the searched items, neovim-qt highlights everything at the right of the text:

After nohlsearch 2

Sometimes, after hitting CTRL-L, it uses the statusbar color instead of the highlighted color:

After nohlsearch 1

Note that this behaviour doesn't happen with plain neovim in a terminal.

I'm using the latest version of neovim-qt AppImage from the GH actions. This bug happens regardless of the neovim version (0.7, or the latest AppImage have the same problem).

jgehrig commented 2 years ago

You can resolve this issue by enabling ext_linegrid, this will be enabled by default in Pull Request #1021.

See ~/.config/nvim-qt/nvim-qt.conf:

[General]
ext_linegrid=true
...

The issue should be effectively fixed once that PR is merged. I will also try to investigate the root cause and fix that too...

przepompownia commented 1 year ago

Confirmed without ext_linegrid on master:

https://user-images.githubusercontent.com/11404453/201710613-e47727a8-1bc9-4523-9797-4db57cfa7cd1.mp4

Not present on jg-underline, both with and without ext_linegrid:

https://user-images.githubusercontent.com/11404453/201713708-97394864-dd87-4458-bad2-5c15c4e3be26.mp4

jgehrig commented 1 year ago

Thanks for the clear and concise testing report! :+1:

Not present on jg-underline, both with and without ext_linegrid:

Interesting, I did not expect this. Some investigation is required!

I will merge the PR shortly, and I will investigate this issue further. I would like to understand a root cause here...

przepompownia commented 1 year ago

It would be good to know (and put on wiki) how to pass -j equivalent to cmake to build it using more threads.

Edit: I found that probably appeding -- -j does it.