Skip to content

Commit b76cf61

Browse files
Merge pull request #59 from Shrimpram/master
Set calendar buffer as nonmodifiable
2 parents a826b44 + b05145c commit b76cf61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/orgmode/objects/calendar.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ function Calendar.open()
7171
end
7272

7373
function Calendar.render()
74+
vim.api.nvim_buf_set_option(Calendar.buf, 'modifiable', true)
75+
7476
local first_row = { 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun' }
7577
local content = { {}, {}, {}, {}, {}, {} }
7678
local start_weekday = Calendar.month:get_isoweekday()
@@ -112,6 +114,8 @@ function Calendar.render()
112114
end
113115
end
114116
end
117+
118+
vim.api.nvim_buf_set_option(Calendar.buf, 'modifiable', false)
115119
end
116120

117121
function Calendar.forward()

0 commit comments

Comments
 (0)