neovim-gtk icon indicating copy to clipboard operation
neovim-gtk copied to clipboard

Character rendering broken with varying word lengths combined with wrapping

Open Lyude opened this issue 5 years ago • 7 comments

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):

  • OS: Fedora 33 x86_64
  • Neovim version: master
  • Neovim-Gtk build version: https://copr.fedorainfracloud.org/coprs/yalter/neovim-gtk/build/1650863/

Some other info that might help:

  • Pango version: 1.47.0
  • GTK version: 3.24.23

Lyude avatar Nov 08 '20 22:11 Lyude

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

Lyude avatar Nov 08 '20 22:11 Lyude

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.

theHamsta avatar Nov 08 '20 22:11 theHamsta

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 avatar Jan 24 '21 18:01 Lyude

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

Lyude avatar Jan 24 '21 19:01 Lyude

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

theHamsta avatar Jan 24 '21 20:01 theHamsta

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

Lyude avatar Jan 24 '21 20:01 Lyude

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

theHamsta avatar Jan 24 '21 21:01 theHamsta