Skip to content

Commit 0a3e055

Browse files
committed
fix(live_prompt): remove skim query workaround for v1
1 parent 95f6bae commit 0a3e055

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

lua/fzf-lua/core.lua

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,13 @@ M.fzf = function(contents, opts)
414414
-- This was added by 'resume': when '--print-query' is specified
415415
-- we are guaranteed to have the query in the first line, save&remove it
416416
if selected and #selected > 0 then
417-
if not (utils.has(opts, "sk") and opts.is_live) then
418-
-- reminder: this doesn't get called with 'live_grep' when using skim
419-
-- due to a bug where '--print-query --interactive' combo is broken:
420-
-- skim always prints an empty line where the typed query should be.
417+
-- NOTE: this doesn't get called with 'live_grep' when using skim <v1
418+
-- due to a bug where '--print-query --interactive' combo is broken:
419+
-- skim always prints an empty line where the typed query should be.
420+
if not (opts.is_live
421+
and utils.has(opts, "sk")
422+
and not utils.has(opts, "sk", { 1, 5, 3 }))
423+
then
421424
config.resume_set("query", selected[1], opts)
422425
end
423426
table.remove(selected, 1)

0 commit comments

Comments
 (0)