aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-01-22 00:17:25 +0300
committerChristian Duerr <contact@christianduerr.com>2020-01-21 22:17:25 +0100
commit906f14b6608480b601d08825461bd1d8eb295cfc (patch)
tree02f4c5b1389ac0865b3c19480459f846fa953d75
parentc84cd0fdb0335fa873f397e95a0a728be0fe15f5 (diff)
downloadalacritty-906f14b6608480b601d08825461bd1d8eb295cfc.tar.gz
alacritty-906f14b6608480b601d08825461bd1d8eb295cfc.zip
Fix oob error during selection
Fixes #3233.
-rw-r--r--alacritty_terminal/src/selection.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs
index 95614502..f23e646d 100644
--- a/alacritty_terminal/src/selection.rs
+++ b/alacritty_terminal/src/selection.rs
@@ -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;