From 46464ebe87057d46175c8baf813fd20c91a72717 Mon Sep 17 00:00:00 2001 From: N8th8n8el Date: Mon, 5 Feb 2024 21:06:43 +0100 Subject: [PATCH] terminal: Fix copy to clipboard lag (#7323) Fixes #7322 Release Notes: - Fixed terminal's copy to clipboard being non-instant ([7322](https://github.com/zed-industries/zed/issues/7322)) --- crates/terminal_view/src/terminal_view.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/terminal_view/src/terminal_view.rs b/crates/terminal_view/src/terminal_view.rs index 6c7270d9b4df076a19aae24fc4715d3dc780b23c..006ffb9d7945c887e5ec09b2ae3a00fa29454471 100644 --- a/crates/terminal_view/src/terminal_view.rs +++ b/crates/terminal_view/src/terminal_view.rs @@ -478,7 +478,8 @@ impl TerminalView { ///Attempt to paste the clipboard into the terminal fn copy(&mut self, _: &Copy, cx: &mut ViewContext) { - self.terminal.update(cx, |term, _| term.copy()) + self.terminal.update(cx, |term, _| term.copy()); + cx.notify(); } ///Attempt to paste the clipboard into the terminal