Browse Source

fix: correctly tab-complete nicks starting with `$`

Without it, nicks starting with `$` would have doubled `$`.

Continuation of #1377

Pointed out by @ProMcTagonist in #1167
pull/3298/head
Zetok Zalbavar 9 years ago
parent
commit
dbd16ae6a3
No known key found for this signature in database
GPG Key ID: C953D3880212068A
  1. 3
      src/widget/form/tabcompleter.cpp

3
src/widget/form/tabcompleter.cpp

@ -54,7 +54,8 @@ void TabCompleter::buildCompletionList() @@ -54,7 +54,8 @@ void TabCompleter::buildCompletionList()
nextCompletion = completionMap.begin();
// split the string on the given RE (not chars, nums or braces/brackets) and take the last section
QString tabAbbrev = msgEdit->toPlainText().left(msgEdit->textCursor().position()).section(QRegExp("[^\\w\\d:@--_\\[\\]{}|`^.\\\\]"), -1, -1);
QString tabAbbrev = msgEdit->toPlainText().left(msgEdit->textCursor().position())
.section(QRegExp("[^\\w\\d\\$:@--_\\[\\]{}|`^.\\\\]"), -1, -1);
// that section is then used as the completion regex
QRegExp regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive);

Loading…
Cancel
Save