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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user