From 4a0683b68574a6edf561e9411fab597882764c6e Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 8 Aug 2014 13:27:23 +1000 Subject: Stop using last argument to AddCharUTF from Korean IME code as previus release always used false for last argument so changing mynot be cmpatible. Move maxLenInputIME to superclass where it can be used for all platforms. --- src/ScintillaBase.h | 2 ++ win32/ScintillaWin.cxx | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h index ee717cbda..668abed3c 100644 --- a/src/ScintillaBase.h +++ b/src/ScintillaBase.h @@ -38,6 +38,8 @@ protected: idcmdSelectAll=16 }; + enum { maxLenInputIME = 200 }; + bool displayPopupMenu; Menu popup; AutoComplete ac; diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 137efbb62..c5dcd8559 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -672,7 +672,6 @@ sptr_t ScintillaWin::HandleComposition(uptr_t wParam, sptr_t lParam) { if (lParam & GCS_RESULTSTR) { HIMC hIMC = ::ImmGetContext(MainHWND()); if (hIMC) { - const int maxLenInputIME = 200; wchar_t wcs[maxLenInputIME]; LONG bytes = ::ImmGetCompositionStringW(hIMC, GCS_RESULTSTR, wcs, (maxLenInputIME-1)*2); @@ -722,7 +721,6 @@ sptr_t ScintillaWin::HandleCompositionKoreanIME(uptr_t, sptr_t lParam) { return 0; } - const int maxLenInputIME = 200; wchar_t wcs[maxLenInputIME]; int wides = 0; bool compstrExist = false; @@ -734,7 +732,7 @@ sptr_t ScintillaWin::HandleCompositionKoreanIME(uptr_t, sptr_t lParam) { // fill in any virtual spaces. bool tmpOverstrike = inOverstrike; inOverstrike = false; // not allow to be deleted twice. - AddCharUTF("", 0, false); + AddCharUTF("", 0); inOverstrike = tmpOverstrike; } @@ -772,7 +770,7 @@ sptr_t ScintillaWin::HandleCompositionKoreanIME(uptr_t, sptr_t lParam) { bool tmpRecordingMacro = recordingMacro; recordingMacro = false; pdoc->TentativeStart(); - AddCharUTF(hanval, hanlen, !IsUnicodeMode()); + AddCharUTF(hanval, hanlen); recordingMacro = tmpRecordingMacro; for (size_t r = 0; r < sel.Count(); r++) { // for block caret @@ -781,7 +779,7 @@ sptr_t ScintillaWin::HandleCompositionKoreanIME(uptr_t, sptr_t lParam) { sel.Range(r).anchor.SetPosition(positionInsert - hanlen); } } else { - AddCharUTF(hanval, hanlen, !IsUnicodeMode()); + AddCharUTF(hanval, hanlen); } } -- cgit v1.2.3