Skip to content

Commit f39a0f1

Browse files
committed
fix: Can't re-enter normal mode from terminal mode
1 parent ca7c4c3 commit f39a0f1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/nvim-tree.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,10 @@ local function setup_autocommands(opts)
199199
callback = function()
200200
vim.schedule(function()
201201
vim.api.nvim_buf_call(0, function()
202+
local is_term_mode = vim.api.nvim_get_mode().mode == "t"
203+
if is_term_mode then
204+
return
205+
end
202206
vim.cmd([[norm! zz]])
203207
end)
204208
end)

0 commit comments

Comments
 (0)