fix(editor): include fullwidth parens in completion depth
This commit is contained in:
1 parent
391af14c75
commit
37a5413641
3 files changed
+49
-9
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user