mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(zen): make zoom and minimizing work in terminal mode (#1912)
## Description This PR fixes an issue where normal mode commands were being executed in terminal mode buffers. The change ensures that the command `norm! zz` is only executed if the buffer type is not "terminal". This prevents errors when using Zen mode with terminal buffers. ## Related Issue(s) - Fixes #1911 ## Screenshots <!-- Add screenshots of the changes if applicable. -->
This commit is contained in:
parent
1db5166b43
commit
fb54927ab0
1 changed files with 3 additions and 1 deletions
|
|
@ -145,7 +145,9 @@ function M.zen(opts)
|
|||
|
||||
-- create window
|
||||
local win = Snacks.win(win_opts)
|
||||
vim.cmd([[norm! zz]])
|
||||
if vim.bo[buf].buftype ~= "terminal" then
|
||||
vim.cmd([[norm! zz]])
|
||||
end
|
||||
M.win = win
|
||||
|
||||
if show_indicator then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue