Skip to content

Commit

Permalink
fix(mini): dodge status line when cmdheight > 0
Browse files Browse the repository at this point in the history
The cmdheight addition in config/init.lua is to avoid breaking the
default setup, where cmdheight is reduced to 0 after MiniView's
initialisation.
  • Loading branch information
Frederick888 committed Jun 5, 2024
1 parent 29c7f03 commit ab545fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/noice/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ function M.setup(options)
end,
})

if M.options.cmdline.enabled then
vim.o.cmdheight = 0
end
require("noice.lsp").setup()
M._running = true
end
Expand Down
1 change: 1 addition & 0 deletions lua/noice/view/backend/mini.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ end

function MiniView:update_options()
self._opts = vim.tbl_deep_extend("force", defaults, self._opts)
self._opts.position.row = self._opts.position.row - vim.o.cmdheight
end

---@param message NoiceMessage
Expand Down

0 comments on commit ab545fb

Please sign in to comment.