fix(editor): preserve snippet navigation after dismissing completion

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-11 23:25:18 +08:00
1 parent 2d9521898f
commit 8b1379ff4f
6 files changed
+468 -10

No files matched your search

@@ -317,6 +317,10 @@ function openReplace(): boolean {
function closeSearch() {
const wasVisible = searchVisible.value;
// Escape also reaches this command while editing. A hidden panel must not
// dispatch a selection reset, which would dismiss completion before its
// Escape handler can consume the key and preserve snippet navigation.
if (!wasVisible) return false;
searchVisible.value = false;
showReplace.value = false;
clearDocumentSearchUpdate();