You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-pair brackets option and VARIABLES lead to four closing brackets #566
When editing a template with the activated Auto-pair brackets option, additional two closing brackets are inserted every time, when using VARIABLES which are enclosed by design in double brackets.
Thanks for the report, and for naming the exact interaction: it is the combination of the two features, not either one alone.
What happened: with auto-pair brackets on, typing {{ gives you {{}} with the caret in the middle, which is correct on its own. But the template variable completion then replaced only the text from the opening braces to the caret with the full {{cursor}}, so the auto-paired }} sitting after the caret survived, and every accepted variable came out as {{cursor}}}}. (Typing the braces out by hand was never affected: typing } over an auto-paired closer steps over it. Only accepting a variable from the popup left the extras behind.)
Fixed in f872b5b on the v2.27.0 branch: the completion's inserted text carries its own closing braces, so applying it now swallows up to two } characters already at the caret. That also fixes a cousin you could hit without auto-pair: editing an existing variable in place (say {{date}} down to {{ti}}) and accepting {{time}} used to leave the old pair's braces behind too.
How to test locally once it ships (or from the branch): with Settings > Editor > Auto-pair brackets on, open Settings > Templates > New template, type {{cur and accept the completion. Before: {{cursor}}}}. After: {{cursor}}. Ships in 2.27.0.
Activity
adibhanna commentedon Aug 10, 2026
Thanks for the report, and for naming the exact interaction: it is the combination of the two features, not either one alone.
What happened: with auto-pair brackets on, typing
{{gives you{{}}with the caret in the middle, which is correct on its own. But the template variable completion then replaced only the text from the opening braces to the caret with the full{{cursor}}, so the auto-paired}}sitting after the caret survived, and every accepted variable came out as{{cursor}}}}. (Typing the braces out by hand was never affected: typing}over an auto-paired closer steps over it. Only accepting a variable from the popup left the extras behind.)Fixed in f872b5b on the
v2.27.0branch: the completion's inserted text carries its own closing braces, so applying it now swallows up to two}characters already at the caret. That also fixes a cousin you could hit without auto-pair: editing an existing variable in place (say{{date}}down to{{ti}}) and accepting{{time}}used to leave the old pair's braces behind too.How to test locally once it ships (or from the branch): with Settings > Editor > Auto-pair brackets on, open Settings > Templates > New template, type
{{curand accept the completion. Before:{{cursor}}}}. After:{{cursor}}. Ships in 2.27.0.adibhanna commentedon Aug 10, 2026
Closing as fixed by f872b5b on the v2.27.0 branch; ships with 2.27.0.
Fix(review): resolve the thirteen findings on the 2.27.0 release PR (#…
Fix(templates): variable completion stops doubling closing braces (Ze…