aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/cell.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/src/term/cell.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/src/term/cell.rs')
-rw-r--r--alacritty_terminal/src/term/cell.rs28
1 files changed, 15 insertions, 13 deletions
diff --git a/alacritty_terminal/src/term/cell.rs b/alacritty_terminal/src/term/cell.rs
index 5f948b19..3fdd8cea 100644
--- a/alacritty_terminal/src/term/cell.rs
+++ b/alacritty_terminal/src/term/cell.rs
@@ -12,18 +12,19 @@ pub const MAX_ZEROWIDTH_CHARS: usize = 5;
bitflags! {
#[derive(Serialize, Deserialize)]
pub struct Flags: u16 {
- const INVERSE = 0b00_0000_0001;
- const BOLD = 0b00_0000_0010;
- const ITALIC = 0b00_0000_0100;
- const BOLD_ITALIC = 0b00_0000_0110;
- const UNDERLINE = 0b00_0000_1000;
- const WRAPLINE = 0b00_0001_0000;
- const WIDE_CHAR = 0b00_0010_0000;
- const WIDE_CHAR_SPACER = 0b00_0100_0000;
- const DIM = 0b00_1000_0000;
- const DIM_BOLD = 0b00_1000_0010;
- const HIDDEN = 0b01_0000_0000;
- const STRIKEOUT = 0b10_0000_0000;
+ const INVERSE = 0b000_0000_0001;
+ const BOLD = 0b000_0000_0010;
+ const ITALIC = 0b000_0000_0100;
+ const BOLD_ITALIC = 0b000_0000_0110;
+ const UNDERLINE = 0b000_0000_1000;
+ const WRAPLINE = 0b000_0001_0000;
+ const WIDE_CHAR = 0b000_0010_0000;
+ const WIDE_CHAR_SPACER = 0b000_0100_0000;
+ const DIM = 0b000_1000_0000;
+ const DIM_BOLD = 0b000_1000_0010;
+ const HIDDEN = 0b001_0000_0000;
+ const STRIKEOUT = 0b010_0000_0000;
+ const LEADING_WIDE_CHAR_SPACER = 0b100_0000_0000;
}
}
@@ -59,7 +60,8 @@ impl GridCell for Cell {
| Flags::UNDERLINE
| Flags::STRIKEOUT
| Flags::WRAPLINE
- | Flags::WIDE_CHAR_SPACER,
+ | Flags::WIDE_CHAR_SPACER
+ | Flags::LEADING_WIDE_CHAR_SPACER,
)
}