Skip to content

Commit 1c91363

Browse files
authored
chore: replace deprecated neovim API (#558)
* chore: replace deprecated neovim API * chore: replace deprecated neovim API
1 parent 92833cd commit 1c91363

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lua/nvim-web-devicons/hi-test.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ return function(
131131
render_icons(bufnr, l, icons_by_window_manager, "By Window Manager")
132132

133133
-- finalise and focus the buffer
134-
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)
134+
if vim.fn.has "nvim-0.10" == 1 then
135+
vim.api.nvim_set_option_value("modifiable", false, { buf = bufnr })
136+
else
137+
vim.api.nvim_buf_set_option(bufnr, "modifiable", false) ---@diagnostic disable-line: deprecated
138+
end
135139
vim.cmd.buffer(bufnr)
136140
end

0 commit comments

Comments
 (0)