We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83f7195 commit 48e299aCopy full SHA for 48e299a
1 file changed
lua/fzf-lua/win.lua
@@ -1179,7 +1179,7 @@ function FzfWin:close(fzf_bufnr, hide)
1179
-- switching from a term win to another term win preserves terminal mode
1180
-- even if the target window was in normal terminal mode (#2054 #2419)
1181
local ctx = utils.__CTX() or {}
1182
- if ctx.mode == "nt" then vim.cmd "stopinsert" end
+ if ctx.mode and ctx.mode:match("^n") then vim.cmd "stopinsert" end
1183
if self.fzf_winid and api.nvim_win_is_valid(self.fzf_winid) then
1184
-- restore the original last window
1185
restore_lastwin(ctx.winid, ctx.last_winid)
0 commit comments