From e305512e58c726ef1855ffec4af69c90cfc9e396 Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 11 Jul 2019 12:49:28 -0400 Subject: Backport: Feature [feature-requests:#1293]. InsertCharacter replaces AddCharUTF. Backport of changeset 7575:e1e9f53b0423. --- src/ScintillaBase.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 0c00309b7..a72267d32 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -78,17 +78,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(s, len); +} + +void ScintillaBase::InsertCharacter(const char *s, unsigned int len) { + const bool isFillUp = ac.Active() && ac.IsFillUpChar(s[0]); if (!isFillUp) { - Editor::AddCharUTF(s, len, treatAsDBCS); + Editor::InsertCharacter(s, len); } if (ac.Active()) { AutoCompleteCharacterAdded(s[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(s, len); } } } -- cgit v1.2.3