Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(internal.resume): dynamic_preview_title was not respected and title became static #2696

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lua/telescope/builtin/__internal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ internal.resume = function(opts)
picker.hidden_previewer = nil
opts.previewer = vim.F.if_nil(opts.previewer, false)
end
opts.resumed_picker = true
pickers.new(opts, picker):find()
end

Expand Down
6 changes: 5 additions & 1 deletion lua/telescope/pickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ function Picker:new(opts)
obj.all_previewers = { obj.all_previewers }
end
obj.previewer = obj.all_previewers[obj.current_previewer_index]
if obj.preview_title == nil or #obj.all_previewers > 1 then
if
obj.preview_title == nil
or #obj.all_previewers > 1
or opts.resumed_picker and opts.fix_preview_title ~= true
then
obj.preview_title = obj.previewer:title(nil, config.values.dynamic_preview_title)
else
obj.fix_preview_title = true
Expand Down