aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/ScintillaEditBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt/ScintillaEditBase/ScintillaEditBase.cpp')
-rw-r--r--qt/ScintillaEditBase/ScintillaEditBase.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/qt/ScintillaEditBase/ScintillaEditBase.cpp b/qt/ScintillaEditBase/ScintillaEditBase.cpp
index d7f25dbdc..ea65fb1d3 100644
--- a/qt/ScintillaEditBase/ScintillaEditBase.cpp
+++ b/qt/ScintillaEditBase/ScintillaEditBase.cpp
@@ -259,7 +259,7 @@ void ScintillaEditBase::keyPressEvent(QKeyEvent *event)
QString text = event->text();
if (input && !text.isEmpty() && text[0].isPrint()) {
QByteArray utext = sqt->BytesForDocument(text);
- sqt->AddCharUTF(utext.data(), utext.size());
+ sqt->InsertCharacter(utext.data(), utext.size());
} else {
event->ignore();
}
@@ -450,7 +450,7 @@ void ScintillaEditBase::DrawImeIndicator(int indicator, int len)
{
// Emulate the visual style of IME characters with indicators.
// Draw an indicator on the character before caret by the character bytes of len
- // so it should be called after AddCharUTF().
+ // so it should be called after InsertCharacter().
// It does not affect caret positions.
if (indicator < 8 || indicator > INDIC_MAX) {
return;
@@ -548,9 +548,8 @@ void ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event)
const unsigned int ucWidth = commitStr.at(i).isHighSurrogate() ? 2 : 1;
const QString oneCharUTF16 = commitStr.mid(i, ucWidth);
const QByteArray oneChar = sqt->BytesForDocument(oneCharUTF16);
- const int oneCharLen = oneChar.length();
- sqt->AddCharUTF(oneChar.data(), oneCharLen);
+ sqt->InsertCharacter(oneChar.data(), oneChar.length());
i += ucWidth;
}
@@ -576,7 +575,7 @@ void ScintillaEditBase::inputMethodEvent(QInputMethodEvent *event)
const QByteArray oneChar = sqt->BytesForDocument(oneCharUTF16);
const int oneCharLen = oneChar.length();
- sqt->AddCharUTF(oneChar.data(), oneCharLen);
+ sqt->InsertCharacter(oneChar.data(), oneCharLen);
DrawImeIndicator(imeIndicator[i], oneCharLen);
i += ucWidth;