aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/tests/ref.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2020-07-09 21:45:22 +0000
committerGitHub <noreply@github.com>2020-07-09 21:45:22 +0000
commit46c0f352c40ecb68653421cb178a297acaf00c6d (patch)
tree3e1985f8237f7c8268703634f8c8ccb25f7823a5 /alacritty_terminal/tests/ref.rs
parent9974bc8baa45fda0b4ba3db2ae615fb7f90f7029 (diff)
downloadalacritty-46c0f352c40ecb68653421cb178a297acaf00c6d.tar.gz
alacritty-46c0f352c40ecb68653421cb178a297acaf00c6d.zip
Add regex scrollback buffer search
This adds a new regex search which allows searching the entire scrollback and jumping between matches using the vi mode. All visible matches should be highlighted unless their lines are excessively long. This should help with performance since highlighting is done during render time. Fixes #1017.
Diffstat (limited to 'alacritty_terminal/tests/ref.rs')
-rw-r--r--alacritty_terminal/tests/ref.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/alacritty_terminal/tests/ref.rs b/alacritty_terminal/tests/ref.rs
index 9c5bbda5..62439775 100644
--- a/alacritty_terminal/tests/ref.rs
+++ b/alacritty_terminal/tests/ref.rs
@@ -8,11 +8,10 @@ use std::path::Path;
use alacritty_terminal::ansi;
use alacritty_terminal::config::MockConfig;
use alacritty_terminal::event::{Event, EventListener};
+use alacritty_terminal::grid::{Dimensions, Grid};
use alacritty_terminal::index::Column;
use alacritty_terminal::term::cell::Cell;
-use alacritty_terminal::term::SizeInfo;
-use alacritty_terminal::Grid;
-use alacritty_terminal::Term;
+use alacritty_terminal::term::{SizeInfo, Term};
macro_rules! ref_tests {
($($name:ident)*) => {
@@ -114,8 +113,8 @@ fn ref_test(dir: &Path) {
term_grid.truncate();
if grid != term_grid {
- for i in 0..grid.len() {
- for j in 0..grid.num_cols().0 {
+ for i in 0..grid.total_lines() {
+ for j in 0..grid.cols().0 {
let cell = term_grid[i][Column(j)];
let original_cell = grid[i][Column(j)];
if original_cell != cell {