Use setPlainText when finishing a completion (#3785)

This commit is contained in:
pajlada 2022-05-30 13:09:38 +02:00 committed by GitHub
parent 64da34342c
commit e9e3e5a25a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -651,7 +651,8 @@ void SplitInput::insertCompletionText(const QString &input_)
if (done)
{
auto cursor = edit.textCursor();
edit.setText(text.remove(i, position - i + 1).insert(i, input));
edit.setPlainText(
text.remove(i, position - i + 1).insert(i, input));
cursor.setPosition(i + input.size());
edit.setTextCursor(cursor);