Use ESC to cancel dragging in Zed (#30318)
Closes https://github.com/zed-industries/zed/issues/11887 ESC is always captured in terminal due to https://github.com/zed-industries/zed/blob/980bfae331dd5078bbba9fe0f3993d9ad5ca6e29/crates/terminal/src/terminal.rs#L1339-L1353 so this part is not fixed. Otherwise, all other drags are cancelled when ESC is pressed: https://github.com/user-attachments/assets/6e70a1e5-c244-420b-9dec-ae2ac2997a59 Release Notes: - Allowed to use ESC to cancel dragging in Zed
This commit is contained in:
@@ -1463,7 +1463,9 @@ impl CollabPanel {
|
||||
}
|
||||
|
||||
fn cancel(&mut self, _: &Cancel, window: &mut Window, cx: &mut Context<Self>) {
|
||||
if self.take_editing_state(window, cx) {
|
||||
if cx.stop_active_drag(window) {
|
||||
return;
|
||||
} else if self.take_editing_state(window, cx) {
|
||||
window.focus(&self.filter_editor.focus_handle(cx));
|
||||
} else if !self.reset_filter_editor_text(window, cx) {
|
||||
self.focus_handle.focus(window);
|
||||
|
||||
Reference in New Issue
Block a user