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:
Aaron Weisberg 2025-10-20 06:08:41 -07:00 committed by GitHub
parent 1db5166b43
commit fb54927ab0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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