Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix: correctly tab-complete nicks starting with $
Browse files Browse the repository at this point in the history
Without it, nicks starting with `$` would have doubled `$`.

Continuation of #1377

Pointed out by @ProMcTagonist in #1167
  • Loading branch information
zetok committed May 15, 2016
1 parent cd26923 commit dbd16ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/widget/form/tabcompleter.cpp
Expand Up @@ -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);

Expand Down

0 comments on commit dbd16ae

Please sign in to comment.