Skip to content

Commit

Permalink
fix(resume): live providers query resume (closes #963)
Browse files Browse the repository at this point in the history
This fixes `:FzfLua resume` not resuming the typed query
  • Loading branch information
ibhagwan committed Dec 22, 2023
1 parent 407323a commit de33c83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/fzf-lua/providers/grep.lua
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ local function normalize_live_grep_opts(opts)
config.resume_set("search", val, { __resume_key = o.__resume_key })
config.resume_set("no_esc", true, { __resume_key = o.__resume_key })
utils.map_set(config, "__resume_data.last_query", val)
-- also store query for `fzf_resume` (#963)
utils.map_set(config, "__resume_data.opts.query", val)
else
config.resume_set(what, val, { __resume_key = o.__resume_key })
end
Expand Down
2 changes: 2 additions & 0 deletions lua/fzf-lua/providers/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,8 @@ M.live_workspace_symbols = function(opts)
what == "query" and "lsp_query" or what, val,
{ __resume_key = o.__resume_key })
utils.map_set(config, "__resume_data.last_query", val)
-- also store query for `fzf_resume` (#963)
utils.map_set(config, "__resume_data.opts.query", val)
end
opts.__resume_get = function(what, o)
return config.resume_get(
Expand Down

0 comments on commit de33c83

Please sign in to comment.