diff --git a/crates/editor/src/jsx_tag_auto_close.rs b/crates/editor/src/jsx_tag_auto_close.rs index 3a181f8e32..e669a59513 100644 --- a/crates/editor/src/jsx_tag_auto_close.rs +++ b/crates/editor/src/jsx_tag_auto_close.rs @@ -316,6 +316,10 @@ pub(crate) fn refresh_enabled_in_any_buffer( let multi_buffer = multi_buffer.read(cx); let mut found_enabled = false; multi_buffer.for_each_buffer(|buffer| { + if found_enabled { + return; + } + let buffer = buffer.read(cx); let snapshot = buffer.snapshot(); for syntax_layer in snapshot.syntax_layers() {