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: preview = true #2168

Merged
merged 2 commits into from
Oct 8, 2022
Merged

Conversation

Conni2461
Copy link
Member

fix #2101

opts.preview = opts.preview or {}
opts = vim.F.if_nil(opts, {})
-- TODO(conni2461): here shouldn't be any hardcoded magic numbers ...
opts.preview = vim.F.if_nil(opts.preview, {})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this still set opts.preview to true or false when it's non nil, and then the following dictionary lookups would still fail?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no because the data is already changed at this point in time, we do that on previewer instanzing

https://github.com/nvim-telescope/telescope.nvim/blob/master/lua/telescope/previewers/buffer_previewer.lua#L38-L46

Do you still experience #2101 with this PR?

@Conni2461 Conni2461 merged commit 3a29c1e into nvim-telescope:master Oct 8, 2022
@Conni2461 Conni2461 deleted the fix/preview_true branch October 8, 2022 05:46
Conni2461 added a commit that referenced this pull request Jan 6, 2023
(cherry picked from commit 3a29c1e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

highlighter error when preview is a boolean
2 participants