3

Sometimes (I can't reproduce it reliably), after opening a tab, the height of my command line becomes excessively big.

When it begins, the buffer displayed in the first newly created tab has only 10 lines. The buffers displayed in the subsequently created tabs have only 3 lines. All the rest is taken by the command line.

I've found 4 ways to make the command line take only one line again.

  • Switching to another tab and coming back (gt, gT)
  • Creating a split and closing it (:sp, :q)
  • Maximizing the window (<C-w> + _)
  • Dragging the status line to the bottom of the screen with the mouse

After that, cycling between the tabs doesn't change the command line height.

However, as soon as I close one, the command line of the tab which gains the focus becomes high again. I usually hit <C-w> + _, which fixes the height until I open or close a tab.

It only concerns a new tab, or the first tab which gains the focus after closing another one.

The value of my 'cmdheight' option is 1, 'cmdwinheight' is 7 and 'winheight' is 999.

If I can't find the cause, maybe I will add an autocmd (something like au TabEnter * wincmd _), but before doing that, is there a way to find what is causing the command line height to be changed when I sometimes open or close a tab ?

  • 2
    The usual means is :verbose set ...?, e.g., :verbose set cmdheight?. That will tell you where 'cmdheight' was last set. I have no explanation for how the command line height could be several lines while 'cmdheight' is 1. – garyjohn Dec 5 '15 at 7:14
  • Thank you very much ! I think it comes from a plugin (specifically from this file: github.com/haya14busa/incsearch.vim/blob/…). If you post your answer, I'll accept it. Anyway, thanks, it will help me find a solution. – saginaw Dec 5 '15 at 7:28
4

To find where an option was last set, use :verbose set <option>?. In this case,

:verbose set cmdheight?

See

:help :verbose-cmd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.