diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2023-11-23 16:48:09 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-23 16:48:09 +0400 |
commit | 40160c5da1fafeab3ccedc52efe2c135f1eab843 (patch) | |
tree | b763e853844e6292535300534aaf68597d708e3d /alacritty/src/event.rs | |
parent | 0589b7189445e5ee236a7ab17b4f3a2047543481 (diff) | |
download | r-alacritty-40160c5da1fafeab3ccedc52efe2c135f1eab843.tar.gz r-alacritty-40160c5da1fafeab3ccedc52efe2c135f1eab843.tar.bz2 r-alacritty-40160c5da1fafeab3ccedc52efe2c135f1eab843.zip |
Damage only terminal inside `alacritty_terminal`
The damage tracking was including selection and vi_cursor which were
rendering viewport related, however all the damage tracking inside
the `alacritty_terminal` was _terminal viewport_ related, meaning that
it should be affected by `display_offset`.
Refactor the damage tracking so `alacritty_terminal` is only tracking
actual terminal updates and properly applying display offset to them,
while `alacritty` pulls this damage into its own UI damage state.
Fixes #7111.
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r-- | alacritty/src/event.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs index e6f77e8c..f19aa2f9 100644 --- a/alacritty/src/event.rs +++ b/alacritty/src/event.rs @@ -517,7 +517,7 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon // Enable IME so we can input into the search bar with it if we were in Vi mode. self.window().set_ime_allowed(true); - self.terminal.mark_fully_damaged(); + self.display.damage_tracker.frame().mark_fully_damaged(); self.display.pending_update.dirty = true; } @@ -853,10 +853,7 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon // If we had search running when leaving Vi mode we should mark terminal fully damaged // to cleanup highlighted results. if self.search_state.dfas.take().is_some() { - self.terminal.mark_fully_damaged(); - } else { - // Damage line indicator. - self.terminal.damage_line(0, 0, self.terminal.columns() - 1); + self.display.damage_tracker.frame().mark_fully_damaged(); } } else { self.clear_selection(); @@ -1029,7 +1026,7 @@ impl<'a, N: Notify + 'a, T: EventListener> ActionContext<'a, N, T> { let vi_mode = self.terminal.mode().contains(TermMode::VI); self.window().set_ime_allowed(!vi_mode); - self.terminal.mark_fully_damaged(); + self.display.damage_tracker.frame().mark_fully_damaged(); self.display.pending_update.dirty = true; self.search_state.history_index = None; |