fix bug when the cursor is on the last column of a horizontally-scrollable line. Before this commit, the last column/character was not visible. Now it is. We fixed this by decrementing the 'howManyColumnsCanWeFit' value in the 'TesxtScroll.getScrollColumn' function by 1. This works because it was an off-by-one error that caused this bug in the first place (we didn't previously count column 0 as visible and taking up space)

This commit is contained in:
2025-09-13 01:03:44 +01:00
parent 295bdc35cf
commit f2ec6b80c2

View File

@@ -15,6 +15,7 @@ struct
val howManyColumnsCanWeFit =
if windowWidth >= TC.textLineWidth then TC.textLineCount
else windowWidth div TC.xSpace
val howManyColumnsCanWeFit = howManyColumnsCanWeFit - 1
in
if columnDifference < howManyColumnsCanWeFit then 0
else columnDifference - howManyColumnsCanWeFit