Skip to content

Commit a826b44

Browse files
author
Kristijan Husak
committed
Fix calendar reset to reset from passed in date object.
1 parent 9dafed4 commit a826b44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/orgmode/objects/calendar.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,11 @@ function Calendar.backward()
125125
end
126126

127127
function Calendar.reset()
128-
Calendar.month = Date.today():start_of('month')
128+
local today = Calendar.month:set_todays_date()
129+
Calendar.month = today:set({ day = 1 })
129130
Calendar.render()
130131
vim.fn.cursor(2, 0)
131-
vim.fn.search(Date.today():format('%d'), 'W')
132+
vim.fn.search(today:format('%d'), 'W')
132133
end
133134

134135
function Calendar:select()

0 commit comments

Comments
 (0)