diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-05-27 00:30:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 21:30:33 +0000 |
commit | 63ef6c931901e895442edf5ec113d0ff609a7c24 (patch) | |
tree | e77e83f798cedfed7048a1914d6411bf8dba8cba /alacritty/src/display/content.rs | |
parent | 3bfc4c2808d7e3ea50fb84780b4c30140114b3b1 (diff) | |
download | r-alacritty-63ef6c931901e895442edf5ec113d0ff609a7c24.tar.gz r-alacritty-63ef6c931901e895442edf5ec113d0ff609a7c24.tar.bz2 r-alacritty-63ef6c931901e895442edf5ec113d0ff609a7c24.zip |
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.
Diffstat (limited to 'alacritty/src/display/content.rs')
-rw-r--r-- | alacritty/src/display/content.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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 |