Skip to content

Commit

Permalink
fix(buffer_previewer): no preview showing when set nomodifiable (#3077
Browse files Browse the repository at this point in the history
)

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 authored Apr 25, 2024
1 parent 7d1698f commit 1084d07
Showing 1 changed file with 1 addition and 0 deletions.
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

0 comments on commit 1084d07

Please sign in to comment.