From 63ef6c931901e895442edf5ec113d0ff609a7c24 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Fri, 27 May 2022 00:30:33 +0300 Subject: Fix Vi cursor not being damaged on scroll There's no need to damage intermediate Vi mode cursor points, since it can't change the terminal content meaning that only the previous and current vi cursor's viewport points matter to damage it properly. --- alacritty/src/display/content.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'alacritty/src/display/content.rs') diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index bb3c61a8..77571d94 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -11,12 +11,12 @@ use alacritty_terminal::selection::SelectionRange; use alacritty_terminal::term::cell::{Cell, Flags}; use alacritty_terminal::term::color::{CellRgb, Rgb}; use alacritty_terminal::term::search::{Match, RegexIter, RegexSearch}; -use alacritty_terminal::term::{RenderableContent as TerminalContent, Term, TermMode}; +use alacritty_terminal::term::{self, RenderableContent as TerminalContent, Term, TermMode}; use crate::config::UiConfig; use crate::display::color::{List, DIM_FACTOR}; use crate::display::hint::HintState; -use crate::display::{self, Display, MAX_SEARCH_LINES}; +use crate::display::{Display, MAX_SEARCH_LINES}; use crate::event::SearchState; /// Minimum contrast between a fixed cursor color and the cell's background. @@ -63,7 +63,7 @@ impl<'a> RenderableContent<'a> { // Convert terminal cursor point to viewport position. let cursor_point = terminal_content.cursor.point; let display_offset = terminal_content.display_offset; - let cursor_point = display::point_to_viewport(display_offset, cursor_point).unwrap(); + let cursor_point = term::point_to_viewport(display_offset, cursor_point).unwrap(); let hint = if display.hint_state.active() { display.hint_state.update_matches(term); @@ -250,7 +250,7 @@ impl RenderableCell { // Convert cell point to viewport position. let cell_point = cell.point; - let point = display::point_to_viewport(display_offset, cell_point).unwrap(); + let point = term::point_to_viewport(display_offset, cell_point).unwrap(); let flags = cell.flags; let underline = cell -- cgit