Microsoft/monaco-editor

Chinese IME does not work correctly with CompletionItemProvider

Open

#2,199 建立於 2020年10月20日

在 GitHub 查看
 (5 留言) (2 反應) (0 負責人)JavaScript (1,283 fork)batch import
bugeditor-input-IMEhelp wantedsuggest

倉庫指標

Star
 (14,836 star)
PR 合併指標
 (平均合併 6小時 26分鐘) (30 天內合併 15 個 PR)

描述

If set suggestion label as a chinese text, the auto complete item will never show when input with chinese IME like sougou.

And I found that the suggestion check is triggered in 'compositionupdate' event instead of 'compositionend,' then the selection check is failed, the preSelection(typed alpha text) is after currentSelection(chinese text):

//  in suggestModel.js : _onCursorChange

(!prevSelection.containsRange(this._currentSelection) && !prevSelection.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))

In vscode there is same problem. the snippets with chinese label doesn't not work.

貢獻者指南