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
commitb56bbafb49a89ae493fdf9298988d0f199583366 (patch)
treeb08c770a778bcedeee6677dd994cc81707bfad51
parentc5905297575b23f9454cb0dfe574140c2a329c95 (diff)
downloadscintilla-mirror-b56bbafb49a89ae493fdf9298988d0f199583366.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);
}
}