aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display/content.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2023-03-25 00:07:20 +0100
committerGitHub <noreply@github.com>2023-03-24 23:07:20 +0000
commit2df8f860b960d7c96efaf4f059fe2fbbdce82bcc (patch)
tree343f21f24245b6d36dc357c206d4f754359c924c /alacritty/src/display/content.rs
parentef8cc5d63f34b09e46d8c733cd5a472d480f7cf1 (diff)
downloadr-alacritty-2df8f860b960d7c96efaf4f059fe2fbbdce82bcc.tar.gz
r-alacritty-2df8f860b960d7c96efaf4f059fe2fbbdce82bcc.tar.bz2
r-alacritty-2df8f860b960d7c96efaf4f059fe2fbbdce82bcc.zip
Fix selection rotation on the last line
This fixes an issue with terminal resizes when the selection is on the last line. Alacritty would fail to rotate lines and keep the selection in the same line index whenever the terminal line count was grown or shrunk. This issue occurred due to the range passed to the selection's rotate function still being based on the old terminal size, which caused the initial or target state of the rotation to be outside of the terminal bounds. Closes #6698.
Diffstat (limited to 'alacritty/src/display/content.rs')
-rw-r--r--alacritty/src/display/content.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs
index c062ba9b..ca49c01a 100644
--- a/alacritty/src/display/content.rs
+++ b/alacritty/src/display/content.rs
@@ -199,7 +199,7 @@ pub struct RenderableCellExtra {
}
impl RenderableCell {
- fn new<'a>(content: &mut RenderableContent<'a>, cell: Indexed<&Cell>) -> Self {
+ fn new(content: &mut RenderableContent<'_>, cell: Indexed<&Cell>) -> Self {
// Lookup RGB values.
let mut fg = Self::compute_fg_rgb(content, cell.fg, cell.flags);
let mut bg = Self::compute_bg_rgb(content, cell.bg);