Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

terminal: Fix not able to select text during continuous output (#37395)

Smit Barmase6dcae2711dd7
diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs
index c0c663f4987..a8b1fcf0f2a 100644
--- a/crates/terminal/src/terminal.rs
+++ b/crates/terminal/src/terminal.rs
@@ -1141,11 +1141,6 @@ impl Terminal {
}
}
- pub fn clear_matches(&mut self) {
- self.matches.clear();
- self.set_selection(None);
- }
-
pub fn select_matches(&mut self, matches: &[RangeInclusive<AlacPoint>]) {
let matches_to_select = self
.matches
diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 9e479464af2..2548a7c2446 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -1523,7 +1523,7 @@ impl SearchableItem for TerminalView {
/// Clear stored matches
fn clear_matches(&mut self, _window: &mut Window, cx: &mut Context<Self>) {
- self.terminal().update(cx, |term, _| term.clear_matches())
+ self.terminal().update(cx, |term, _| term.matches.clear())
}
/// Store matches returned from find_matches somewhere for rendering