Skip to content

Commit 582fa5d

Browse files
committed
refactor: change vim.opt to vim.o
1 parent 0b196b6 commit 582fa5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/devto-nvim/buffer.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ end
1515
--- @param buffer number The buffer to write to
1616
--- @param lines string[] The lines to write
1717
function M.write(buffer, lines, offset)
18-
local modifiable = vim.opt_local.modifiable:get()
19-
vim.opt_local.modifiable = true
18+
local modifiable = vim.o.modifiable
19+
vim.o.modifiable = true
2020
vim.api.nvim_buf_set_lines(
2121
buffer,
2222
offset or 0,
2323
-1,
2424
false,
2525
lines
2626
)
27-
vim.opt_local.modifiable = modifiable
27+
vim.o.modifiable = modifiable
2828
end
2929

3030
--- Get the content of the current buffer

0 commit comments

Comments
 (0)