From c8850a2e3e284033142db0f8117fa5998c68bd59 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 10 Jul 2026 04:22:10 +0300 Subject: feat: add copy mode search and tmux word motions refs #1230 --- src/pane.rs | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'src/pane.rs') diff --git a/src/pane.rs b/src/pane.rs index a6edaaa7..19d356dc 100644 --- a/src/pane.rs +++ b/src/pane.rs @@ -40,7 +40,10 @@ use self::agent_detection::{ AGENT_PENDING_IDLE_RECHECK, AGENT_STARTUP_GRACE_WINDOW, }; use self::terminal::{GhosttyPaneTerminal, PaneTerminal}; -pub(crate) use self::terminal::{TerminalDirtyPatch, TerminalDirtyPatchOutcome}; +pub(crate) use self::terminal::{ + TerminalDirtyPatch, TerminalDirtyPatchOutcome, TerminalTextMatch, TerminalTextPoint, + TerminalWordMotion, +}; pub use self::{ state::PaneState, terminal::{InputState, ScrollMetrics, TerminalCursorState}, @@ -2383,6 +2386,34 @@ impl PaneRuntime { self.terminal.scroll_metrics() } + pub(crate) fn search_text_matches( + &self, + query: &str, + case_sensitive: bool, + ) -> Vec { + self.terminal.search_text_matches(query, case_sensitive) + } + + pub(crate) fn text_match_is_current(&self, text_match: crate::pane::TerminalTextMatch) -> bool { + self.terminal.text_match_is_current(text_match) + } + + pub(crate) fn text_matches_are_current( + &self, + text_matches: &[crate::pane::TerminalTextMatch], + ) -> Vec { + self.terminal.text_matches_are_current(text_matches) + } + + pub(crate) fn word_motion_target( + &self, + row: u32, + col: u16, + motion: crate::pane::TerminalWordMotion, + ) -> Option { + self.terminal.word_motion_target(row, col, motion) + } + pub fn input_state(&self) -> Option { self.terminal.input_state() } -- cgit v1.2.3