From 906f14b6608480b601d08825461bd1d8eb295cfc Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Wed, 22 Jan 2020 00:17:25 +0300 Subject: [PATCH] Fix oob error during selection Fixes #3233. --- alacritty_terminal/src/selection.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs index 9561450..f23e646 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;