diff options
Diffstat (limited to 'alacritty_terminal/src/term')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 13 | ||||
-rw-r--r-- | alacritty_terminal/src/term/search.rs | 8 |
2 files changed, 7 insertions, 14 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); } diff --git a/alacritty_terminal/src/term/search.rs b/alacritty_terminal/src/term/search.rs index b1766b05..a6664054 100644 --- a/alacritty_terminal/src/term/search.rs +++ b/alacritty_terminal/src/term/search.rs @@ -28,7 +28,7 @@ pub struct RegexSearch { } impl RegexSearch { - /// Build the forwards and backwards search DFAs. + /// Build the forward and backward search DFAs. pub fn new(search: &str) -> Result<RegexSearch, RegexError> { // Check case info for smart case let has_uppercase = search.chars().any(|c| c.is_uppercase()); @@ -318,7 +318,7 @@ impl<T> Term<T> { let start_char = self.grid[point.line][point.col].c; // Find the matching bracket we're looking for - let (forwards, end_char) = BRACKET_PAIRS.iter().find_map(|(open, close)| { + let (forward, end_char) = BRACKET_PAIRS.iter().find_map(|(open, close)| { if open == &start_char { Some((true, *close)) } else if close == &start_char { @@ -336,7 +336,7 @@ impl<T> Term<T> { loop { // Check the next cell - let cell = if forwards { iter.next() } else { iter.prev() }; + let cell = if forward { iter.next() } else { iter.prev() }; // Break if there are no more cells let c = match cell { @@ -633,7 +633,7 @@ mod tests { fn reverse_search_dead_recovery() { let mut term = mock_term("zooo lense"); - // Make sure the reverse DFA operates the same as a forwards DFA. + // Make sure the reverse DFA operates the same as a forward DFA. term.regex_search = Some(RegexSearch::new("zoo").unwrap()); let start = Point::new(0, Column(9)); let end = Point::new(0, Column(0)); |