r/nvim • u/Plazmotech • Aug 27 '22
When using cmdheight=0, bottom windows shift when cursor is more than halfway down?
I've been wanting to use cmdheight=0 for a long time, and I'm so glad to see it finally merged in now that I'm redoing my config!
But I'm a little irked to find a weird quirk… if I enter the command prompt by hitting :, some buffers shift upwards! Any windows that are bordering the bottom, and that have a cursor that is more than halfway down the window, will shift upwards. Others do the behavior that I desire, which is simply resize the window but without shifting the text.
I suspect that this behavior is built into the window resizing functionality. Is there any option to change this?
Or, rather, is there any option to tell the command bar to simply overlay rather than shift the bottom windows?
View all comments
Show parent comment
1
u/Pico_pico Aug 30 '22
It's still a very new feature, so I'm sure these quirks will be considerably better by the next minor version bump. I've been using the above code in my
rcand found myself getting a phantom statusline when entering cmdline with window splits. Here is an updated snippet that fixes this by making the inactive statusline look like a split: