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:
parent
9724418d35
commit
18a226fe45
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue