aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
diff options
context:
space:
mode:
authorZufu Liu <unknown>2019-06-30 08:34:46 +1000
committerZufu Liu <unknown>2019-06-30 08:34:46 +1000
commitd7e2afd1f88bf735b010461ff505470bfa468547 (patch)
tree0305fc8fd126909438c6da42cf90d53a3201b8c2 /gtk/ScintillaGTK.cxx
parent24bff87107d89a09e724993e053e7151945596e8 (diff)
downloadscintilla-mirror-d7e2afd1f88bf735b010461ff505470bfa468547.tar.gz
Bug [#2038]. Source of input reported in SCN_CHARADDED.
This may be SC_CHARACTERSOURCE_DIRECT_INPUT, SC_CHARACTERSOURCE_TENTATIVE_INPUT, or SC_CHARACTERSOURCE_IME_RESULT.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 3b1972880..5da17aacf 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -2351,7 +2351,7 @@ void ScintillaGTK::CommitThis(char *commitStr) {
if (!IsUnicodeMode())
docChar = ConvertText(u8Char, u8CharLen, charSetSource, "UTF-8", true);
- InsertCharacter(docChar);
+ InsertCharacter(docChar, CharacterSource::directInput);
}
g_free(uniStr);
ShowCaretAtCurrentPosition();
@@ -2403,8 +2403,6 @@ void ScintillaGTK::PreeditChangedInlineThis() {
std::vector<int> indicator = MapImeIndicators(preeditStr.attrs, preeditStr.str);
- const bool tmpRecordingMacro = recordingMacro;
- recordingMacro = false;
for (glong i = 0; i < preeditStr.uniStrLen; i++) {
gchar u8Char[UTF8MaxBytes+2] = {0};
const gint u8CharLen = g_unichar_to_utf8(preeditStr.uniStr[i], u8Char);
@@ -2412,11 +2410,10 @@ void ScintillaGTK::PreeditChangedInlineThis() {
if (!IsUnicodeMode())
docChar = ConvertText(u8Char, u8CharLen, charSetSource, "UTF-8", true);
- InsertCharacter(docChar);
+ InsertCharacter(docChar, CharacterSource::tentativeInput);
DrawImeIndicator(indicator[i], docChar.size());
}
- recordingMacro = tmpRecordingMacro;
// Move caret to ime cursor position.
const int imeEndToImeCaretU32 = preeditStr.cursor_pos - preeditStr.uniStrLen;