refactor(#2787): replace deprecated

This commit is contained in:
Alexander Courtis
2024-06-01 16:05:41 +10:00
parent 94b4aec87c
commit a9e9b2d91d

View File

@@ -173,7 +173,13 @@ local function open()
-- populate it -- populate it
vim.api.nvim_buf_set_lines(M.bufnr, 0, -1, false, lines) vim.api.nvim_buf_set_lines(M.bufnr, 0, -1, false, lines)
vim.api.nvim_buf_set_option(M.bufnr, "modifiable", false)
if vim.fn.has "nvim-0.10" == 1 then
vim.api.nvim_set_option_value("modifiable", false, { buf = M.bufnr })
else
---@diagnostic disable-next-line: deprecated
vim.api.nvim_buf_set_option(M.bufnr, "modifiable", false)
end
-- highlight it -- highlight it
for _, h in ipairs(hl) do for _, h in ipairs(hl) do