Skip to content

Commit

Permalink
Korean IME use inline mode by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Sep 1, 2018
1 parent 1c8a928 commit 2e16516
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions scintilla/include/Scintilla.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ extern "C" {
/* Return false on failure: */
int Scintilla_RegisterClasses(void *hInstance);
int Scintilla_ReleaseResources(void);
int Scintilla_InputCodePage(void);
#endif
int Scintilla_LinkLexers(void);

Expand Down
4 changes: 4 additions & 0 deletions scintilla/win32/ScintillaWin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3667,3 +3667,7 @@ int ResourcesRelease(bool fromDllMain) noexcept {
int Scintilla_ReleaseResources(void) {
return Scintilla::ResourcesRelease(false);
}

int Scintilla_InputCodePage(void) {
return InputCodePage();
}
10 changes: 9 additions & 1 deletion src/Notepad2.c
Original file line number Diff line number Diff line change
Expand Up @@ -5347,7 +5347,15 @@ void LoadSettings(void) {
iBidirectional = clamp_i(iBidirectional, SC_BIDIRECTIONAL_DISABLED, SC_BIDIRECTIONAL_R2L);
iFontQuality = IniSectionGetInt(pIniSection, L"FontQuality", SC_EFF_QUALITY_LCD_OPTIMIZED);
iFontQuality = clamp_i(iFontQuality, SC_EFF_QUALITY_DEFAULT, SC_EFF_QUALITY_LCD_OPTIMIZED);
bUseInlineIME = IniSectionGetInt(pIniSection, L"UseInlineIME", SC_IME_WINDOWED);
// Korean IME use inline mode (and block caret in inline mode) by default
bUseInlineIME = IniSectionGetBool(pIniSection, L"UseInlineIME", -1);
if (bUseInlineIME == -1) {
// ScintillaWin::KoreanIME()
const int codePage = Scintilla_InputCodePage();
if (codePage == 949 || codePage == 1361) {
bUseInlineIME = TRUE;
}
}

IniSectionGetString(pIniSection, L"ToolbarButtons", L"", tchToolbarButtons, COUNTOF(tchToolbarButtons));

Expand Down

0 comments on commit 2e16516

Please sign in to comment.