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
This commit is contained in:
3 files changed
+48
-23
No files matched your search
+8
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user