This commit is contained in:
fourtf
2018-02-05 21:20:38 +01:00
23 changed files with 255 additions and 104 deletions
+6 -2
View File
@@ -85,12 +85,16 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
if (doComplete) {
// check if there is a completer
return_if_not(this->completer);
if (!this->completer) {
return;
}
QString currentCompletionPrefix = this->textUnderCursor();
// check if there is something to complete
return_if_not(currentCompletionPrefix.size());
if (!currentCompletionPrefix.size()) {
return;
}
auto *completionModel =
static_cast<chatterino::singletons::CompletionModel *>(this->completer->model());