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.
This commit is contained in:
AoMe · 青目
2024-04-26 00:26:17 +02:00
committed by GitHub
parent 7d1698f3d8
commit 1084d07cf4

View File

@@ -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