Skip to content

Commit 48e299a

Browse files
committed
fix: resume any "normal"-like mode
1 parent 83f7195 commit 48e299a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/fzf-lua/win.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ function FzfWin:close(fzf_bufnr, hide)
11791179
-- switching from a term win to another term win preserves terminal mode
11801180
-- even if the target window was in normal terminal mode (#2054 #2419)
11811181
local ctx = utils.__CTX() or {}
1182-
if ctx.mode == "nt" then vim.cmd "stopinsert" end
1182+
if ctx.mode and ctx.mode:match("^n") then vim.cmd "stopinsert" end
11831183
if self.fzf_winid and api.nvim_win_is_valid(self.fzf_winid) then
11841184
-- restore the original last window
11851185
restore_lastwin(ctx.winid, ctx.last_winid)

0 commit comments

Comments
 (0)