diff options
author | mitchell <unknown> | 2019-07-11 12:49:28 -0400 |
---|---|---|
committer | mitchell <unknown> | 2019-07-11 12:49:28 -0400 |
commit | e305512e58c726ef1855ffec4af69c90cfc9e396 (patch) | |
tree | 9ac416d8c4d4c676d9bf8b7c6f546e179b583616 /src/ScintillaBase.cxx | |
parent | f40378978a7b3bb901a2085a2c76b1ac4a3f45a0 (diff) | |
download | scintilla-mirror-e305512e58c726ef1855ffec4af69c90cfc9e396.tar.gz |
Backport: Feature [feature-requests:#1293]. InsertCharacter replaces AddCharUTF.
Backport of changeset 7575:e1e9f53b0423.
Diffstat (limited to 'src/ScintillaBase.cxx')
-rw-r--r-- | src/ScintillaBase.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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); } } } |