未验证 提交 bae62c11 编写于 作者: A Alexandru Dima 提交者: GitHub

Merge pull request #44259 from yh1224/fulllwidth

Treat full-width character as two visible columns.
......@@ -454,6 +454,8 @@ export class CursorColumns {
let charCode = lineContent.charCodeAt(i);
if (charCode === CharCode.Tab) {
result = this.nextTabStop(result, tabSize);
} else if (strings.isFullWidthCharacter(charCode)) {
result = result + 2;
} else {
result = result + 1;
}
......@@ -479,6 +481,8 @@ export class CursorColumns {
let afterVisibleColumn: number;
if (charCode === CharCode.Tab) {
afterVisibleColumn = this.nextTabStop(beforeVisibleColumn, tabSize);
} else if (strings.isFullWidthCharacter(charCode)) {
afterVisibleColumn = beforeVisibleColumn + 2;
} else {
afterVisibleColumn = beforeVisibleColumn + 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册