Closed rtega closed 1 year ago
To answer my own question this could easily be accomplished by adding this line
call sort(evts.events, function('calendar#view#month#day_sorter'))
before https://github.com/itchyny/calendar.vim/blob/5ab65172102035d93fabb7f9c31b8539618a6297/autoload/calendar/view/month.vim#L235
And adding this function:
function! calendar#view#month#day_sorter(x, y) abort
return a:x.sec == a:y.sec
\ ? (get(a:x, 'summary', '') > get(a:y, 'summary', '') ? 1 : -1)
\ : a:x.sec > a:y.sec ? 1 : -1
endfunction
The same issue also holds for other views, as I'm seeing it in the week view.
Probably the same issue.
In the month view entries are sorted first according to the calendar to which they belong then according to the time. One would expect this to be according to time first and then to calendar.
A typical example would be something like this:
This should be sorted: 16:00 17:30 18:00
Or did I overlook some option for this?