Skip to content

Commit 8619c04

Browse files
committed
fix: schedule setting buffer modifiable
fixes #17
1 parent 0af84e5 commit 8619c04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nui-components/component/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ function Component:initial_value()
395395
end
396396

397397
function Component:modify_buffer_content(modify_fn)
398-
self:set_buffer_option("modifiable", true)
399398
vim.schedule(function()
399+
self:set_buffer_option("modifiable", true)
400400
modify_fn()
401401
vim.schedule(function()
402402
self:set_buffer_option("modifiable", false)

0 commit comments

Comments
 (0)