Observe calendar monday option correctly

The calendar plugin checks the existence of calendar_monday, not whether
it's 0 or 1, so we don't want to set it unless it's 1.
This commit is contained in:
Ernie Miller
2022-05-05 19:29:09 -04:00
parent c0925f0d30
commit 49c3a90f32

View File

@@ -2658,7 +2658,6 @@ local function SetupCalendar(opts)
let g:calendar_action = 'MyCalAction'
" let g:calendar_begin = 'MyCalBegin'
let g:calendar_monday = {{calendar_monday}}
let g:calendar_mark = '{{calendar_mark}}'
let g:calendar_weeknm = {{weeknm}}
]]
@@ -2667,6 +2666,9 @@ local function SetupCalendar(opts)
cmd = cmd:gsub("{{" .. k .. "}}", v)
end
vim.cmd(cmd)
if opts.calendar_monday == 1 then
vim.cmd("let g:calendar_monday = 1")
end
end
local function ToggleTodo(opts)