aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2014-08-08 13:27:23 +1000
committerNeil <nyamatongwe@gmail.com>2014-08-08 13:27:23 +1000
commit4a0683b68574a6edf561e9411fab597882764c6e (patch)
tree857476831013025cdea5425877916ceeae4effd6
parenta2940fd23daf6f8d82c9c821de5c40077ce0da84 (diff)
downloadscintilla-mirror-4a0683b68574a6edf561e9411fab597882764c6e.tar.gz
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.
-rw-r--r--src/ScintillaBase.h2
-rw-r--r--win32/ScintillaWin.cxx8
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);
}
}