提交 08000c4c 编写于 作者: P Peng Lyu

Fix #57250. Do not do any auto closing check/update if the cursor is before an...

Fix #57250. Do not do any auto closing check/update if the cursor is before an closing brace in composition mode.
上级 f044c47d
......@@ -767,7 +767,13 @@ export class TypeOperations {
if (characterAfter) {
let isBeforeCloseBrace = TypeOperations._isBeforeClosingBrace(config, ch, characterAfter);
let shouldAutoCloseBefore = isQuote(ch) ? config.shouldAutoCloseBefore.quote : config.shouldAutoCloseBefore.bracket;
if (!isBeforeCloseBrace && !shouldAutoCloseBefore(characterAfter)) {
if (isBeforeCloseBrace) {
// In normal auto closing logic, we will auto close if the cursor is even before a closing brace intentionally.
// However for composition mode, we do nothing here as users might clear all the characters for composition and we don't want to do a unnecessary auto close.
// Related: microsoft/vscode#57250.
continue;
}
if (!shouldAutoCloseBefore(characterAfter)) {
continue;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册