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 /curses/ScintillaCurses.cxx | |
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 'curses/ScintillaCurses.cxx')
-rw-r--r-- | curses/ScintillaCurses.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/curses/ScintillaCurses.cxx b/curses/ScintillaCurses.cxx index 4941ba344..3325d881b 100644 --- a/curses/ScintillaCurses.cxx +++ b/curses/ScintillaCurses.cxx @@ -1069,8 +1069,13 @@ public: char utf8[6]; int len; toutf8(key, utf8, &len); - return (InsertCharacter(utf8, len), 1); - } else return (AddChar(key), 1); + InsertCharacter(utf8, len, EditModel::CharacterSource::directInput); + return 1; + } else { + char ch = static_cast<char>(key); + InsertCharacter(&ch, 1, EditModel::CharacterSource::directInput); + return 1; + } } else { SCNotification scn = {}; scn.nmhdr.code = SCN_KEY; |