equalsraf / neovim-qt

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

GuiLinespace behavior with negative numbers #370

Closed Leandros closed 6 years ago

Leandros commented 6 years ago

The, sort-of, sister issue to #369. After I figured out how to set negative linespacing numbers, I realized neovim-qt, as opposed to gvim, only subtracts the linespacing from the top, resulting in the linespacing only getting thin at the top of each line. This is usually fine for things like text, but once you have a line filled with a background (like a statusline), you notice it. I believe gvim is subtracting half the linespacing at the bottom and the other half at the top, to shrink the lines equally.

It would be terrific if this behavior could be fixed in neovim-qt. So far I'm very happy, looks and feels beautiful. Great work!

equalsraf commented 6 years ago

Not all GUIs have the same behaviour e.g. from https://github.com/equalsraf/neovim-qt/pull/127#issuecomment-221408496 for positive values we used to put space at the bottom, MacVim places it at the top

And it seems gvim splits the space between the top and bottom (code here)

2018-01-20-232144_916x558_scrot

So basicaly linespace

  1. alters the line height (here)
  2. changes the baseline of the text being drawn (here) pushing it down for positive values

I don't mind either way, but this is one of those that usually falls under personal preference.

Some quick side notes for later

justinmk commented 6 years ago

FWIW I just noticed that nvim 0.2.3 doesn't forward the 'linespace' option. https://github.com/neovim/neovim/pull/7883 corrects that.

Leandros commented 6 years ago

Would be great to have neovim-qt behave similar to how gvim does behave (or, alternatively, change the behavior with a config option).