fix: incorrect deletion length in tab autocomplete
This commit is contained in:
@@ -291,8 +291,8 @@ void ResizingTextEdit::insertCompletion(const QString &completion)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QTextCursor tc = this->textCursor();
|
QTextCursor tc = this->textCursor();
|
||||||
tc.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor,
|
int completionStart = tc.position() - prefixSize;
|
||||||
prefixSize);
|
tc.setPosition(completionStart, QTextCursor::KeepAnchor);
|
||||||
tc.insertText(completion);
|
tc.insertText(completion);
|
||||||
this->setTextCursor(tc);
|
this->setTextCursor(tc);
|
||||||
this->updateGeometry();
|
this->updateGeometry();
|
||||||
|
|||||||
Reference in New Issue
Block a user