equalsraf / neovim-qt

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

neovim-qt can't handle overlapping glyphs with different highlighting #924

Open mawkler opened 3 years ago

mawkler commented 3 years ago

In my statusline I use the nerd font glyphs  (nf-ple-upper_left_triangle and nf-ple-upper_right_triangle) as separators between segments. I noticed that neovim-qt can't handle when those two glyphs have different highlight groups. However, in my terminal (terminator) it works fine as you can see in attached screenshots.

Notice that when the glyphs have the same highlight group (gray background) they are rendered correctly.

Here's a screenshot from neovim-qt:

feline-qt

And here's a screenshot from terminator:

feline-terminal

jgehrig commented 3 years ago

I'd guess this is very similar to (or a duplicate of) #271 #154

We render groups of characters with the same style. At the beginning of each group, we draw a rectangular box to clear past cells. The background-color wipe is deleting the gray triangle.

Part 2 of this proposed algorithm might fix the issue: https://github.com/equalsraf/neovim-qt/issues/154#issuecomment-727221934

(We already implemented Part 1).

mawkler commented 3 years ago

@jgehrig I see, thank you!