mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
autocomplete will work for : also,fixes #1377
This commit is contained in:
parent
f55fd40ec6
commit
86bbe537bc
|
@ -49,7 +49,7 @@ void TabCompleter::buildCompletionList()
|
||||||
nextCompletion = completionMap.begin();
|
nextCompletion = completionMap.begin();
|
||||||
|
|
||||||
// split the string on the given RE (not chars, nums or braces/brackets) and take the last section
|
// 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
|
// that section is then used as the completion regex
|
||||||
QRegExp regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive);
|
QRegExp regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user