Skip to content

Commit f09831c

Browse files
committed
Fix off-by-one error
Truncating to the end of the line would draw one space too few. Again, this wasn't a problem before jesseduffield/lazygit#3687, but when redrawing the commits panel it could be observed when using the H/L keys.
1 parent b2fe13b commit f09831c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ func (v *View) parseInput(ch rune, x int, _ int) (bool, []cell) {
838838
for _, cell := range v.lines[v.wy][0:v.wx] {
839839
cx += runewidth.RuneWidth(cell.chr)
840840
}
841-
repeatCount = v.InnerWidth() - cx
841+
repeatCount = v.InnerWidth() - cx + 1
842842
ch = ' '
843843
truncateLine = true
844844
} else if isEscape {

0 commit comments

Comments
 (0)