From: Sebastian Goth Date: Mon, 21 Sep 2009 11:35:02 +0000 (+0200) Subject: Allow tab completion of nicks after various chars X-Git-Tag: 0.5-rc2~20 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=819082c6f9002505e9f2492f7fc75991768e719c Allow tab completion of nicks after various chars This allows nick completion after @ or ( and some more. Completion doesn't work after -_[]{}|`^.\ or any number or text as those might belong to the nick and we still want support for easy completion of ^A`w3s0m3_N1x} Fixes #812 --- diff --git a/src/uisupport/tabcompleter.cpp b/src/uisupport/tabcompleter.cpp index b9b6eb14..88c2f0c6 100644 --- a/src/uisupport/tabcompleter.cpp +++ b/src/uisupport/tabcompleter.cpp @@ -61,8 +61,8 @@ void TabCompleter::buildCompletionList() { if(!_currentNetwork) return; - QString tabAbbrev = _lineEdit->text().left(_lineEdit->cursorPosition()).section(' ',-1,-1); - QRegExp regex(QString("^[^a-zA-Z]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive); + QString tabAbbrev = _lineEdit->text().left(_lineEdit->cursorPosition()).section(QRegExp("[^\\w\\d-_\\[\\]{}|`^.\\\\]"),-1,-1); + QRegExp regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive); switch(static_cast(currentIndex.data(NetworkModel::BufferTypeRole).toInt())) { case BufferInfo::ChannelBuffer: