diff options
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 5a44fd9af..6799dfd06 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -79,17 +79,21 @@ void ScintillaBase::Finalise() { popup.Destroy(); } -void ScintillaBase::AddCharUTF(const char *s, unsigned int len, bool treatAsDBCS) { - const bool isFillUp = ac.Active() && ac.IsFillUpChar(*s); +void ScintillaBase::AddCharUTF(const char *s, unsigned int len, bool /*treatAsDBCS*/) { + InsertCharacter(std::string_view(s, len)); +} + +void ScintillaBase::InsertCharacter(std::string_view sv) { + const bool isFillUp = ac.Active() && ac.IsFillUpChar(sv[0]); if (!isFillUp) { - Editor::AddCharUTF(s, len, treatAsDBCS); + Editor::InsertCharacter(sv); } if (ac.Active()) { - AutoCompleteCharacterAdded(s[0]); + AutoCompleteCharacterAdded(sv[0]); // For fill ups add the character after the autocompletion has // triggered so containers see the key so can display a calltip. if (isFillUp) { - Editor::AddCharUTF(s, len, treatAsDBCS); + Editor::InsertCharacter(sv); } } } |