summaryrefslogtreecommitdiffstats
path: root/alacritty_terminal
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal')
-rw-r--r--alacritty_terminal/src/grid/mod.rs2
-rw-r--r--alacritty_terminal/src/grid/tests.rs4
-rw-r--r--alacritty_terminal/src/term/mod.rs13
-rw-r--r--alacritty_terminal/src/term/search.rs8
4 files changed, 10 insertions, 17 deletions
diff --git a/alacritty_terminal/src/grid/mod.rs b/alacritty_terminal/src/grid/mod.rs
index c1f980e8..5ab25c78 100644
--- a/alacritty_terminal/src/grid/mod.rs
+++ b/alacritty_terminal/src/grid/mod.rs
@@ -252,7 +252,7 @@ impl<T: GridCell + Default + PartialEq + Copy> Grid<T> {
}
}
- /// Move lines at the bottom towards the top.
+ /// Move lines at the bottom toward the top.
///
/// This is the performance-sensitive part of scrolling.
pub fn scroll_up(&mut self, region: &Range<Line>, positions: Line, template: T) {
diff --git a/alacritty_terminal/src/grid/tests.rs b/alacritty_terminal/src/grid/tests.rs
index 1ed279a0..f86c77b5 100644
--- a/alacritty_terminal/src/grid/tests.rs
+++ b/alacritty_terminal/src/grid/tests.rs
@@ -56,7 +56,7 @@ fn visible_to_buffer() {
assert_eq!(point, Point::new(4, Column(3)));
}
-// Scroll up moves lines upwards.
+// Scroll up moves lines upward.
#[test]
fn scroll_up() {
let mut grid = Grid::new(Line(10), Column(1), 0, 0);
@@ -88,7 +88,7 @@ fn scroll_up() {
assert_eq!(grid[Line(9)].occ, 0);
}
-// Scroll down moves lines downwards.
+// Scroll down moves lines downward.
#[test]
fn scroll_down() {
let mut grid = Grid::new(Line(10), Column(1), 0, 0);
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));