From fb54927ab0d5b4ce3a377d9bcd7b172d0692725d Mon Sep 17 00:00:00 2001 From: Aaron Weisberg Date: Mon, 20 Oct 2025 06:08:41 -0700 Subject: [PATCH] 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 --- lua/snacks/zen.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/snacks/zen.lua b/lua/snacks/zen.lua index a490d267..f8bd3728 100644 --- a/lua/snacks/zen.lua +++ b/lua/snacks/zen.lua @@ -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