Propagate Cancel when editor is not in full mode
This is consistent with what VS Code and Sublime Text do and allows the user to perform only one keybinding to e.g. dismiss the find bar when the query is (partially) selected.
This commit is contained in:
1 parent
1446f1833e
commit
b7d56b7e45
1 file changed
+5
@@ -1091,6 +1091,11 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext<Self>) {
|
||||
if self.mode != EditorMode::Full {
|
||||
cx.propagate_action();
|
||||
return;
|
||||
}
|
||||
|
||||
if self.active_diagnostics.is_some() {
|
||||
self.dismiss_diagnostics(cx);
|
||||
} else if let Some(PendingSelection { selection, .. }) = self.pending_selection.take() {
|
||||
|
||||
Reference in new issue
Block a user