aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/search.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2023-11-10 18:16:22 +0400
committerGitHub <noreply@github.com>2023-11-10 18:16:22 +0400
commit5060f8eeb864e8c304fbad9588bdd882db942356 (patch)
treeb615ded19e6ac545b495f716e2a22ecd903332af /alacritty_terminal/src/term/search.rs
parent3ffd6c8f26f9788466b9ba95659b8de970a10f08 (diff)
downloadalacritty-5060f8eeb864e8c304fbad9588bdd882db942356.tar.gz
alacritty-5060f8eeb864e8c304fbad9588bdd882db942356.zip
Remove `alacritty_config` from alacritty_terminal
There's no need to force alacritty's user configuration on other users of the crate, thus provide the options actually used by alacritty_terminal itself.
Diffstat (limited to 'alacritty_terminal/src/term/search.rs')
-rw-r--r--alacritty_terminal/src/term/search.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/alacritty_terminal/src/term/search.rs b/alacritty_terminal/src/term/search.rs
index 8e329255..9e900b8a 100644
--- a/alacritty_terminal/src/term/search.rs
+++ b/alacritty_terminal/src/term/search.rs
@@ -515,7 +515,7 @@ impl<T> Term<T> {
/// Find left end of semantic block.
#[must_use]
pub fn semantic_search_left(&self, point: Point) -> Point {
- match self.inline_search_left(point, &self.semantic_escape_chars) {
+ match self.inline_search_left(point, self.semantic_escape_chars()) {
Ok(point) => self.grid.iter_from(point).next().map_or(point, |cell| cell.point),
Err(point) => point,
}
@@ -524,7 +524,7 @@ impl<T> Term<T> {
/// Find right end of semantic block.
#[must_use]
pub fn semantic_search_right(&self, point: Point) -> Point {
- match self.inline_search_right(point, &self.semantic_escape_chars) {
+ match self.inline_search_right(point, self.semantic_escape_chars()) {
Ok(point) => self.grid.iter_from(point).prev().map_or(point, |cell| cell.point),
Err(point) => point,
}
@@ -676,9 +676,9 @@ impl<'a, T> Iterator for RegexIter<'a, T> {
mod tests {
use super::*;
- use crate::config::Config;
use crate::index::{Column, Line};
use crate::term::test::{mock_term, TermSize};
+ use crate::term::Config;
#[test]
fn regex_right() {
@@ -1052,7 +1052,7 @@ mod tests {
#[test]
fn wide_without_spacer() {
let size = TermSize::new(2, 2);
- let mut term = Term::new(&Config::default(), &size, ());
+ let mut term = Term::new(Config::default(), &size, ());
term.grid[Line(0)][Column(0)].c = 'x';
term.grid[Line(0)][Column(1)].c = '字';
term.grid[Line(0)][Column(1)].flags = Flags::WIDE_CHAR;