fix(editor): include fullwidth parens in completion depth

This commit is contained in:
Mo-Moore authored and GitHub committed 2026-09-23 16:30:07 +08:00
1 parent 391af14c75
commit 37a5413641
3 files changed
+49 -9

No files matched your search

+5 -4
View File
@@ -486,13 +486,14 @@ function stepLexState(sql: string, index: number, state: LexState, dialectId: st
}
return index + 1;
}
if (ch === "(") {
// Match tokenizeSqlSemantic: fullwidth () update nesting the same as ASCII ().
if (ch === "(" || ch === "\uFF08") {
state.depth += 1;
return index + 1;
return index + ch.length;
}
if (ch === ")") {
if (ch === ")" || ch === "\uFF09") {
state.depth = Math.max(0, state.depth - 1);
return index + 1;
return index + ch.length;
}
return index + 1;
}