fix(buffer_previewer): no preview showing when set nomodifiable (#3077)

Not showing a preview with the new changes in the latest changes of
[plenary.nvim PR
#575](https://github.com/nvim-lua/plenary.nvim/pull/575).

The error occurs when changing from `nomodifiable` to `modifiable`.
Telescope itself works, but the previews don't render.

(cherry picked from commit 1084d07cf4)
This commit is contained in:
AoMe · 青目
2024-05-20 11:29:39 +02:00
committed by Simon Hauser
parent 021a358db9
commit 01928ddecc
@@ -368,6 +368,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