Closed bluenlive closed 6 years ago
Notapad2 (currently) only support auto-completion for _a-zA-Z0-9 and some punctuation, a later version may add support for extended Latin characters, see https://github.com/zufuliu/notepad2/issues/36.
The new option "Auto Complete Words Only in English IME Mode" is that, modern IME in native mode (Chinese, Japanese, Korean, etc.) may let user select English words, when this option is enabled, the selected word will NOT trigger auto-completion.
I think directly type Korean text is quicker than auto-completion. Another reason is that CJK text doesn't has space between characters, auto-completion with a full sentence (or paragraph in ANSI encoding mode, as punctuation is treated as word in Scintilla, this is still not fixed, see https://sourceforge.net/p/scintilla/feature-requests/1226/).
Okay. I understand it. I'll close this issue.
Thank you, always.
Hi @bluenlive, auto completion for Korean is possible (by Alt + / or Edit -> Insert -> Complete Word) since commit c4f533e7eac430dcc81378c48bf122dac6912030.
Auto completion on typing can be implemented (as an option?) by change SCN_CHARADDED
:
https://github.com/zufuliu/notepad2/blob/master/src/Notepad2.c#L4880
if (!autoCompletionConfig.bCompleteWord
// ignore IME input
|| (scn->modifiers && (ch >= 0x80 || autoCompletionConfig.bEnglistIMEModeOnly))
|| !IsAutoCompletionWordCharacter(ch)
) {
return 0;
}
and IsAutoCompletionWordCharacter()
:
https://github.com/zufuliu/notepad2/blob/master/scintilla/src/Document.h#L549
bool IsAutoCompletionWordCharacter(unsigned int ch) const noexcept {
return WordCharacterClass(ch) == CharClassify::ccWord;
}
With Korean IME(maybe with other IMEs), IDM_VIEW_AUTOC_ENGLISH_ONLY seems not work properly. Even when IDM_VIEW_AUTOC_ENGLISH_ONLY is false, we cannot use "auto completion" feature with Korean.
Maybe following lines in notepad.c causes it:
Could you check it?