Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gibfahn opened this issue Sep 15, 2022 · 4 comments

Comments

@gibfahn
Copy link

gibfahn commented Sep 15, 2022

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.

@hnandiwada
Copy link

+1

Gee19 added a commit to Gee19/vim-peekaboo that referenced this issue Nov 8, 2022
- Fixes infamous cmdline resize bug (junegunn#74 & junegunn#83)
@jackielii
Copy link

I think it's dup of #74

@gibfahn
Copy link
Author

gibfahn commented Apr 6, 2023

I think it's dup of #74

Yeah I believe so too, but filed a new issue as I'm not 100% sure. See #74 (comment)

@junegunn
Copy link
Owner

junegunn commented Apr 7, 2023

I currently don't have the bandwidth to look into this problem (it's not affecting my workflow), please send a pull request and I'll be happy to merge it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants