added settings to mention users with ,
This commit is contained in:
@@ -102,6 +102,17 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
|
||||
QString currentCompletionPrefix = this->textUnderCursor();
|
||||
bool isFirstWord = [&] {
|
||||
QString plainText = this->toPlainText();
|
||||
for (int i = this->textCursor().position(); i >= 0; i--)
|
||||
{
|
||||
if (plainText[i] == ' ')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}();
|
||||
|
||||
// check if there is something to complete
|
||||
if (currentCompletionPrefix.size() <= 1)
|
||||
@@ -117,7 +128,7 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
// First type pressing tab after modifying a message, we refresh our
|
||||
// completion model
|
||||
this->completer_->setModel(completionModel);
|
||||
completionModel->refresh(currentCompletionPrefix);
|
||||
completionModel->refresh(currentCompletionPrefix, isFirstWord);
|
||||
this->completionInProgress_ = true;
|
||||
this->completer_->setCompletionPrefix(currentCompletionPrefix);
|
||||
this->completer_->complete();
|
||||
|
||||
@@ -262,6 +262,8 @@ void GeneralPage::initLayout(SettingsLayout &layout)
|
||||
layout.addCheckbox("Show stream title", s.headerStreamTitle);
|
||||
|
||||
layout.addTitle("Miscellaneous");
|
||||
layout.addCheckbox("Mention users with a comma (User,)",
|
||||
s.mentionUsersWithComma);
|
||||
layout.addCheckbox("Show joined users (< 1000 chatters)", s.showJoins);
|
||||
layout.addCheckbox("Show parted users (< 1000 chatters)", s.showParts);
|
||||
layout.addCheckbox("Lowercase domains", s.lowercaseDomains);
|
||||
|
||||
Reference in New Issue
Block a user