From bd441723a0466cf8d7b7f11c2c20d356979d9340 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Thu, 3 Feb 2022 10:37:15 +0100 Subject: [PATCH] Cancel innermost snippet insertion when hitting `esc` --- crates/editor/src/editor.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 8cb2891fa2..30ef12b886 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -1171,6 +1171,10 @@ impl Editor { return; } + if self.snippet_stack.pop().is_some() { + return; + } + if self.mode != EditorMode::Full { cx.propagate_action(); return;