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(#3076): no preview showing when set nomodifiable #3077

Merged
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
fix(buffer_previewer): no preview showing when set nomodifiable
Not showing a preview with the new changes in the latest changes of
[plenary.nvim PR
#575](nvim-lua/plenary.nvim#575).

The error occurs when changing from `nomodifiable` to `modifiable`.
Telescope itself works, but the previews don't render.
  • Loading branch information
AlejandroSuero committed Apr 25, 2024
commit 87daa90c87df86cc59e68e1ac8e851ff2295160d
1 change: 1 addition & 0 deletions lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ previewers.new_buffer_previewer = function(opts)
else
local bufnr = vim.api.nvim_create_buf(false, true)
set_bufnr(self, bufnr)
vim.api.nvim_buf_set_option(bufnr, "modifiable", true)

vim.schedule(function()
if vim.api.nvim_buf_is_valid(bufnr) then
Expand Down