qvacua / vimr

VimR — Neovim GUI for macOS in Swift
https://twitter.com/VimRefined
MIT License
6.64k stars 218 forks source link

Status line: incorrect location, length without custom tab implementation #932

Open mars0i opened 2 years ago

mars0i commented 2 years ago

When "Use custom tab implementation"i unchecked, the status line can appear in the wrong place with the wrong length. It looks like there is a default y coordinate and length for the status bar that isn't updated to reflect the size of the VimR window.

If the window is large, the status bar floats too high, and it's too short:

vimr_screenshot2_small

If the window is small, the status bar is missing, because it's below the bottom of the window.

In either case, using the mouse to adjust the VimR window size causes the status bar to snap into the correct position and length (the full length of the window, one line above the bottom). Maybe this would be easy to fix by calling something that resizing with the mouse causes to happen.

VimR Version 0.38.2 (20220322.180037) MacOS 10.15.7

(Thank you for vimR.)

mars0i commented 2 years ago

This might be a separate issue--I can submit a second issue if that's better--but it seems like it might be related. Let me know if I should submit a new issue for it.

In MacVim, I can use set columns=N and set lines=N to change the dimensions of the vim window. I use these so that I can script changes in the window size. This is very useful for me.

Those two command partially work in VimR, but they only move the status bar, and then it's in the wrong place in relation to the window. These commands don't change the shape of the VimR window. (Again, resizing with the mouse causes the status bar to move to its correct location, but the point is to avoid using the mouse for a resizing operation that I do all the time.)

mars0i commented 2 years ago

I decided I should make the preceding comment a separate issue anyway (#934), since it concerns whether one can resize the window using vim commands.

mars0i commented 2 years ago

Possibly relevant: https://github.com/neovim/neovim/issues/11330 See this recent illustration: https://neovim.discourse.group/t/neovim-doesnt-open-fullscreen/2221

Maybe a solution to #934 would provide a workaround for this issue in VimR, since the user could then write a function that resized the GUI window automatically, thus causing the status line to snap into the correct location (I hope).

0az commented 7 months ago

I can repro this with and without that setting checked using Anonymous Pro, 18.0. Anything that forces a re-layout from the GUI-side (resize, font size change) will fix this.

Never mind, skimmed right over an unconditional set columns= call on the next line.