From 6d09eded79111d00c96ea094bca0eb74945b7826 Mon Sep 17 00:00:00 2001 From: Bryan Mehall Date: Fri, 27 Mar 2026 15:32:30 -0600 Subject: [PATCH] Fix bracketed paste in terminal on middle click (#52158) ## Context **Current Behavior:** Middle click pastes multiple lines of text and runs each as an individual terminal command **Expected Behavior:** On Linux middle click should use bracketed paste to paste multiple lines and wait for the user to hit "Enter" before running all commands together like when pressing Ctrl+Shift+V Steps to reproduce old behavior: 1. Open terminal 2. Copy multiple lines of text from outside the terminal 3. Middle click to paste text in terminal ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: Fixed multiple line paste behavior in terminal on middle click Co-authored-by: Bryan Mehall <1575089+bryanmehall@users.noreply.github.com> --- crates/terminal/src/terminal.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index 2ff689972a275e6ae4546af270838c02ec4a4b92..b620f5f03c2debf19cdc4856da8c039fe690651f 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -1949,7 +1949,7 @@ impl Terminal { MouseButton::Middle => { if let Some(item) = _cx.read_from_primary() { let text = item.text().unwrap_or_default(); - self.input(text.into_bytes()); + self.paste(&text); } } _ => {}