From 5a4fbb452d3fb22034dc429a010ee8e374b6ce36 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Fri, 19 Jun 2026 18:53:44 +0200 Subject: [PATCH] fix(editor): close completion popup after accepting a value Accepting an enum value (e.g. "on-track") re-ran the chained refresh, which re-matched the value and reopened the popup. Chain only after completing a key, when there are still values to offer. --- src/components/PlanEditor.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/PlanEditor.vue b/src/components/PlanEditor.vue index bf67598..66c724a 100644 --- a/src/components/PlanEditor.vue +++ b/src/components/PlanEditor.vue @@ -87,7 +87,9 @@ function accept(i: number) { nextTick(() => { el.setSelectionRange(caret, caret) el.focus() - refresh() // chain, e.g. `status = ` immediately offers the enum values + // Chain only after completing a key (insert ends `= `), so its values pop + // up next. A value or header is terminal — re-running would re-offer it. + if (item.insert.endsWith("= ")) refresh() }) }