Fix oob error during selection

Fixes #3233.
This commit is contained in:
Kirill Chibisov 2020-01-22 00:17:25 +03:00 committed by Christian Duerr
parent c84cd0fdb0
commit 906f14b660
1 changed files with 1 additions and 1 deletions

View File

@ -338,7 +338,7 @@ impl Selection {
if end.side == Side::Left && start.point != end.point {
// Special case when selection ends to left of first cell
if end.point.col == Column(0) {
end.point.col = num_cols;
end.point.col = num_cols - 1;
end.point.line += 1;
} else {
end.point.col -= 1;