From dbd16ae6a362809e8fc2936968cd7f0677b7e6f0 Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Thu, 12 May 2016 19:38:55 +0100 Subject: [PATCH] fix: correctly tab-complete nicks starting with `$` Without it, nicks starting with `$` would have doubled `$`. Continuation of #1377 Pointed out by @ProMcTagonist in #1167 --- src/widget/form/tabcompleter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widget/form/tabcompleter.cpp b/src/widget/form/tabcompleter.cpp index 4c897bc1c..6252010af 100644 --- a/src/widget/form/tabcompleter.cpp +++ b/src/widget/form/tabcompleter.cpp @@ -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);