Skip to content

Commit 46a0df7

Browse files
committed
feat(complete): terminal mode
``` nvim --headless --clean --server $NVIM --remote-send "<cmd>FzfLua complete_path<cr>" ```
1 parent 109d75d commit 46a0df7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/fzf-lua/actions.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,10 @@ M.complete = function(selected, opts)
10781078
newline = line:sub(1, col) .. selected[1] .. after
10791079
newcol = col + #selected[1]
10801080
end
1081+
if opts.__CTX.mode == "t" and vim.bo[opts.__CTX.bufnr].buftype == "terminal" then
1082+
vim.api.nvim_chan_send(vim.bo.channel, newline)
1083+
return
1084+
end
10811085
vim.api.nvim_set_current_line(newline or opts.__CTX.line)
10821086
vim.api.nvim_win_set_cursor(0, { opts.__CTX.cursor[1], newcol or col })
10831087
if opts.__CTX.mode == "i" then

0 commit comments

Comments
 (0)