Skip to content

Commit 7972e2a

Browse files
committed
fix: revert 97a5b92, bd9ead9
1 parent 97a5b92 commit 7972e2a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lua/fzf-lua/fzf.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ function M.raw_fzf(contents, fzf_cli_args, opts)
194194
utils.feed_keys_termcodes("i")
195195
else
196196
-- TODO(#2683):
197-
utils.feed_keys_termcodes("i")
198-
-- vim.cmd [[startinsert]]
197+
-- utils.feed_keys_termcodes("i")
198+
vim.cmd [[startinsert]]
199199
end
200200
end
201201

lua/fzf-lua/win.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,8 @@ 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 and ctx.mode:match("^n") then vim.cmd "stopinsert" end
1182+
-- if ctx.mode and ctx.mode:match("^n") then vim.cmd "stopinsert" end
1183+
if ctx.mode == "nt" then vim.cmd "stopinsert" end
11831184
if self.fzf_winid and api.nvim_win_is_valid(self.fzf_winid) then
11841185
-- restore the original last window
11851186
restore_lastwin(ctx.winid, ctx.last_winid)

0 commit comments

Comments
 (0)