T12: a terminal about to be hidden ends its mouse gesture as releases would: its selection drag ends and its program hears each held button come up
CI / platforms (windows-latest) (push) Failing after 8s
CI / macos (push) Failing after 8m33s
CI / platforms (ubuntu-24.04) (push) Canceled after 0s

This commit is contained in:
ZacharyZhang-NY committed 2026-10-14 18:19:40 -04:00
1 parent 5fd674e82a
commit dcf9f7bc27
3 files changed
+48 -23

No files matched your search

+8 -2
View File
@@ -159,9 +159,15 @@ impl Workspace {
/// Shows session `index`, clears its bell, and gives its terminal the keys.
pub fn select(&mut self, index: usize, window: &mut Window, cx: &mut Context<Self>) {
let Some(session) = self.sessions.get_mut(index) else {
if index >= self.sessions.len() {
return;
};
}
if index != self.active
&& let Some(hidden) = self.sessions.get(self.active)
{
hidden.terminal.update(cx, |view, cx| view.let_go(cx));
}
let session = &mut self.sessions[index];
session.bell = false;
window.focus(&session.terminal.focus_handle(cx), cx);
self.active = index;