Skip to content

vim-peekaboo sets cmdheight to max, meaning I can only see 1 line of my window output #83

@gibfahn

Description

@gibfahn

Originally raised at neoclide/coc.nvim#4178 (comment). I also saw #74, but I'm not 100% sure that's the same issue.

Describe the bug

When I apply a macro, the cmdheight gets set to the max, so that I can only see one line of the output.

Reproduce the bug

Plugins:

This reproduces for me on my laptop screen.

export tmp=$TMPDIR/nvim_4178
rm -rf "$tmp"
export XDG_DATA_HOME=$tmp/xdg_data_home
export XDG_CONFIG_HOME=$tmp/xdg_config_home
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
echo "
set nocompatible
set runtimepath^=/path/to/coc.nvim
filetype plugin indent on
syntax on
set hidden

call plug#begin()
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/vim-peekaboo'
call plug#end()
" >"$tmp/mini.vim"
curl -o "$tmp/CONTRIBUTING.md" https://raw.githubusercontent.com/Homebrew/brew/master/CONTRIBUTING.md
nvim -es -u "$tmp/mini.vim" -i NONE -c "PlugInstall" -c "qa"
nvim -u $tmp/mini.vim -c "CocInstall -sync coc-markdownlint|qa"
nvim -u "$tmp/mini.vim" "$tmp/CONTRIBUTING.md"

When you get the contributing.md open, press w till you get to the / of the .github/ and then type:

  • "
  • Esc

And you should be left with 1 line at the top of the screen (and set cmdheight? should return something like 54).

I mostly hit this while applying a macro that uses a register, but this seems like an easier reproduction.

I think the key is to open the window on a long line, so that the wrapping of the text changes when the peekaboo window opens/closes.

Screenshots (optional)

image

The reason is vim-peekaboo create bad winrestcmd at junegunn/vim-peekaboo@cc4469c/autoload/peekaboo.vim#L61, it doesn't consider float window which fired BufEnter before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions