diff options
| author | mitchell <unknown> | 2019-07-11 14:12:28 -0400 |
|---|---|---|
| committer | mitchell <unknown> | 2019-07-11 14:12:28 -0400 |
| commit | 2a15b94200abe8ee0df2dddc296f3dafd55655f8 (patch) | |
| tree | 7236773c70225185fe1532d109a66f98c39e8d18 /gtk | |
| parent | 55446b8967ed0a7f66502424d309f0b8fa74919f (diff) | |
| download | scintilla-mirror-2a15b94200abe8ee0df2dddc296f3dafd55655f8.tar.gz | |
Backport: 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.
Backport of changeset 7613:4cfac35c71bd.
Diffstat (limited to 'gtk')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index eab650179..9e3410450 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -2350,7 +2350,7 @@ void ScintillaGTK::CommitThis(char *commitStr) { if (!IsUnicodeMode()) docChar = ConvertText(u8Char, u8CharLen, charSetSource, "UTF-8", true); - InsertCharacter(docChar.c_str(), docChar.size()); + InsertCharacter(docChar.c_str(), docChar.size(), 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.c_str(), docChar.size()); + InsertCharacter(docChar.c_str(), docChar.size(), CharacterSource::tentativeInput); DrawImeIndicator(indicator[i], docChar.size()); } - recordingMacro = tmpRecordingMacro; // Move caret to ime cursor position. const int imeEndToImeCaretU32 = preeditStr.cursor_pos - preeditStr.uniStrLen; |
