From 8d38a07348c8e937ac7aeba2d60b16557b4f5b4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petar=20Kapri=C5=A1?= Date: Tue, 30 Nov 2021 20:29:12 +0100 Subject: [PATCH] Fix "December scrolling past current year" bug Until this commit there was a bug which caused the current selected year to change if the user 'L'-ed past the right of December, while the number of months which can fit into one row did not divide 12. --- drw/wall.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drw/wall.go b/drw/wall.go index 84b2af3..e11ac05 100644 --- a/drw/wall.go +++ b/drw/wall.go @@ -122,7 +122,7 @@ func MoveDown() { func MoveRight() { if util.SelTime.Weekday() != time.Sunday && util.SelTime.Day() != lastDay(util.SelTime.Month()).Day() { util.SelTime = util.SelTime.AddDate(0, 0, 1) - } else if int(util.SelTime.Month())%monthsWide != 0 { + } else if int(util.SelTime.Month())%monthsWide != 0 && int(util.SelTime.Month()) != 12 { util.SelTime = leftmostInRow(util.SelTime.Month()+1, rowInMonth(util.SelTime.Month(), util.SelTime.Day())) } }