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(previewer): preview=false option inheritance #3327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions lua/telescope/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ command.convert_user_opts = function(user_opts)
user_opts[key] = eval
else
-- otherwise return nil (allows split check later)
-- BUG: this doesn't allow things like `preview=false`, where an
-- option supports other types other than the default type
-- (`preview` has a default type of table)
user_opts[key] = nil
end
end
Expand Down
3 changes: 3 additions & 0 deletions lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ local function defaulter(f, default_opts)
default_opts = default_opts or {}
return {
new = function(opts)
if opts.preview == false then
return false
end
if conf.preview == false and not opts.preview then
return false
end
Expand Down
Loading