mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Dismiss active diagnostics when hitting escape
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
5094380c83
commit
f39942863b
1 changed files with 3 additions and 1 deletions
|
@ -703,7 +703,9 @@ impl Editor {
|
|||
}
|
||||
|
||||
pub fn cancel(&mut self, _: &Cancel, cx: &mut ViewContext<Self>) {
|
||||
if let Some(pending_selection) = self.pending_selection.take() {
|
||||
if self.active_diagnostics.is_some() {
|
||||
self.dismiss_diagnostics(cx);
|
||||
} else if let Some(pending_selection) = self.pending_selection.take() {
|
||||
let buffer = self.buffer.read(cx);
|
||||
let pending_selection = Selection {
|
||||
id: pending_selection.id,
|
||||
|
|
Loading…
Reference in a new issue