Skip to content

Commit

Permalink
fix: workaround E36: Not enough room errors (#522)
Browse files Browse the repository at this point in the history
Due to the neovim upstream issue (neovim/neovim#19464),
creating a float window will always inherit the winbar from the parent window.
As such, the window height need to be >=2 to prevent "E36: Not enough room" error.
  • Loading branch information
xu-cheng authored Jun 26, 2023
1 parent 0d672bd commit f43775f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/noice/view/scrollbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ function Scrollbar:_open_win(opts)
relative = "editor",
focusable = false,
width = 1,
height = 1,
-- HACK: height should be >=2 in case of winbar, which is inherited from the parent window
-- Change back to 1 when the upstream issue is fixed.
-- See https://github.com/neovim/neovim/issues/19464
height = 2,
row = 0,
col = 0,
style = "minimal",
Expand Down

0 comments on commit f43775f

Please sign in to comment.