1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

Fix vi mode terminal reset

Since the vi mode is unrelated to the terminal emulation itself, it
should not be reset during a `reset` to prevent unnecessary confusion.

This also prevents the search from switching from vi mode to vi-less
search without any indication to the user.
This commit is contained in:
Christian Duerr 2020-11-19 01:15:34 +00:00 committed by GitHub
parent 9724418d35
commit 18a226fe45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed ### Fixed
- Wide characters sometimes being cut off - Wide characters sometimes being cut off
- Preserve vi mode across terminal `reset`
## 0.6.0 ## 0.6.0

View file

@ -2083,7 +2083,6 @@ impl<T: EventListener> Handler for Term<T> {
mem::swap(&mut self.grid, &mut self.inactive_grid); mem::swap(&mut self.grid, &mut self.inactive_grid);
} }
self.active_charset = Default::default(); self.active_charset = Default::default();
self.mode = Default::default();
self.colors = self.original_colors; self.colors = self.original_colors;
self.color_modified = [false; color::COUNT]; self.color_modified = [false; color::COUNT];
self.cursor_style = None; self.cursor_style = None;
@ -2095,6 +2094,10 @@ impl<T: EventListener> Handler for Term<T> {
self.title = None; self.title = None;
self.selection = None; self.selection = None;
self.regex_search = None; self.regex_search = None;
// Preserve vi mode across resets.
self.mode &= TermMode::VI;
self.mode.insert(TermMode::default());
} }
#[inline] #[inline]