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_view: Reset cursor blink on `SendText` and `SendKeystroke` actions (#53171)

João Soares9c5f3b10fdd0
diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs
index 3ecc6c844db..acccd6129f7 100644
--- a/crates/terminal_view/src/terminal_view.rs
+++ b/crates/terminal_view/src/terminal_view.rs
@@ -850,6 +850,7 @@ impl TerminalView {
fn send_text(&mut self, text: &SendText, _: &mut Window, cx: &mut Context<Self>) {
self.clear_bell(cx);
+ self.blink_manager.update(cx, BlinkManager::pause_blinking);
self.terminal.update(cx, |term, _| {
term.input(text.0.to_string().into_bytes());
});
@@ -858,6 +859,7 @@ impl TerminalView {
fn send_keystroke(&mut self, text: &SendKeystroke, _: &mut Window, cx: &mut Context<Self>) {
if let Some(keystroke) = Keystroke::parse(&text.0).log_err() {
self.clear_bell(cx);
+ self.blink_manager.update(cx, BlinkManager::pause_blinking);
self.process_keystroke(&keystroke, cx);
}
}