mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
fix(ui2): ensure msg window is visible after closing tab
Problem: After closing a tabpage while the msg window is showing a
message, it is hidden while the msg window still contains a
message.
Solution: Unhide the msg window after entering a tabpage and it still
contains a message.
Co-authored-by: Linykq <yukunlin590@gmail.com>
This commit is contained in:
@@ -239,8 +239,12 @@ function M.enable(opts)
|
||||
|
||||
api.nvim_create_autocmd({ 'VimResized', 'TabEnter' }, {
|
||||
group = M.augroup,
|
||||
callback = function()
|
||||
callback = function(ev)
|
||||
M.check_targets()
|
||||
-- After a tabpage was closed unhide the msg window on the current tabpage.
|
||||
if ev.event == 'TabEnter' and next(M.msg.msg.ids) ~= nil then
|
||||
api.nvim_win_set_config(M.wins.msg, { hide = false, width = M.msg.msg.width })
|
||||
end
|
||||
M.msg.set_pos()
|
||||
end,
|
||||
desc = 'Set cmdline and message window dimensions after shell resize or tabpage change.',
|
||||
|
||||
Reference in New Issue
Block a user