diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-07-15 21:27:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 21:27:32 +0000 |
commit | 142f84efb955a9fa59f4205ec3a6db3964c5f433 (patch) | |
tree | 450d1f210dd961de872f8105cdb4290a13194d97 /alacritty_terminal/src/term/mod.rs | |
parent | d868848ef162ce1d2d5e41b690a592199e9f652d (diff) | |
download | r-alacritty-142f84efb955a9fa59f4205ec3a6db3964c5f433.tar.gz r-alacritty-142f84efb955a9fa59f4205ec3a6db3964c5f433.tar.bz2 r-alacritty-142f84efb955a9fa59f4205ec3a6db3964c5f433.zip |
Add support for searching without vi mode
This implements search without vi mode by using the selection to track
the active search match and advancing it on user input. The keys to go
to the next or previous match are not configurable and are bound to
enter and shift enter based on Firefox's behavior.
Fixes #3937.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 5a59b55b..91748359 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -725,7 +725,7 @@ pub struct Term<T> { /// term is set. title_stack: Vec<Option<String>>, - /// Current forwards and backwards buffer search regexes. + /// Current forward and backward buffer search regexes. regex_search: Option<RegexSearch>, } @@ -1115,13 +1115,6 @@ impl<T> Term<T> { self.dirty = true; } - /// Start vi mode without moving the cursor. - #[inline] - pub fn set_vi_mode(&mut self) { - self.mode.insert(TermMode::VI); - self.dirty = true; - } - /// Move vi mode cursor. #[inline] pub fn vi_motion(&mut self, motion: ViMotion) @@ -1466,8 +1459,8 @@ impl<T: EventListener> Handler for Term<T> { ptr::copy(src, dst, num_cells); } - // Cells were just moved out towards the end of the line; fill in - // between source and dest with blanks. + // Cells were just moved out toward the end of the line; + // fill in between source and dest with blanks. for c in &mut line[source..destination] { c.reset(&cursor.template); } |