From cb9534eae0d3c373cea5ff4f4e8bb399bc27c972 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 24 Oct 2022 17:46:06 -0700 Subject: [PATCH] Fix autoclose skipping when start and end are the same character --- crates/editor/src/editor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index 1d660db1fb..387920d81e 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -2080,7 +2080,9 @@ impl Editor { )); continue; } - } else if let Some(region) = autoclose_region { + } + + if let Some(region) = autoclose_region { // If the selection is followed by an auto-inserted closing bracket, // then don't insert that closing bracket again; just move the selection // past the closing bracket.