daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 57 forks source link

Character rendering broken with varying word lengths combined with wrapping #258

Open Lyude opened 3 years ago

Lyude commented 3 years ago

Describe the bug If you have wrapping enabled in neovim-gtk (:set wrap) and you have a long string of text which contains words of varying lengths (such as the string "foo ba " repeated until wrapping starts), some of the words don't appear to actually render. Interestingly enough, the only words that don't render are ones which are shorter than the longest word in the string.

An example

Technical information (please complete the following information):

Some other info that might help:

Lyude commented 3 years ago

Heh, moments after filing this issue I happened to notice something else: it's not just word wrapping, the problem seems to happen if there's any non-ASCII glyphs being displayed on the same line ("→foo ba foo" by itself exhibits the same issue):

Screenshot from 2020-11-08 17-06-55

theHamsta commented 3 years ago

Possible duplicate of https://github.com/daa84/neovim-gtk/issues/254 . I have the same issue since updating to Ubuntu 20.10 and thus to a newer pango version. Would really love having this solved.

Lyude commented 3 years ago

Hm, ironically I had just finished teaching myself rust (I've done plenty of C programming, but rust is new to me!) and was about to start debugging this and come up with a fix, and then I noticed after updating my system today I'm not seeing the issue anymore. It looks like maybe this was a regression with pango or something? Unfortunately I'm not quite sure what updated to fix this, fwiw: I'm now on pango 1.48.0-1.fc33, gtk3 3.24.24-1.fc33.

@theHamsta btw ^

Lyude commented 3 years ago

Ah-nevermind, just managed to reproduce it. Looking to see if I can figure out the fix for this

theHamsta commented 3 years ago

:smile: Just recompiled with latest master of pango, and I'm also still seeing this issue.

Lyude commented 3 years ago

Also dear neovim-gtk maintainer - if you can get to this first I'd recommend it, I'm definitely not that familiar with this codebase (and don't have a whole ton of time on my hands) so it might take me a while to figure out the problem here.

I have figured out one thing at least, which is that it was 279bd5256b17ed68d50fbaaf7df60f189de33c96 ("itemize: Work around gtk2 brokenness") in pango that caused this breakage

theHamsta commented 3 years ago

Btw. I am not a maintainer. But your info may be interesting for @daa84