channel-completion.diff
| src/uisupport/tabcompleter.cpp | ||
|---|---|---|
| 62 | 62 |
return; |
| 63 | 63 | |
| 64 | 64 |
QString tabAbbrev = inputLine->text().left(inputLine->cursorPosition()).section(' ',-1,-1);
|
| 65 |
QRegExp regex(QString("^[^a-zA-Z]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive);
|
|
| 65 |
QRegExp regex(QString("^[^a-zA-Z#]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive);
|
|
| 66 | 66 | |
| 67 |
//Adds each channel on network to CompletionMap for all buffers. |
|
| 68 |
foreach(QString channel, _currentNetwork->channels()) {
|
|
| 69 |
if(regex.indexIn(channel) > -1) |
|
| 70 |
completionMap[channel.toLower()] = channel; |
|
| 71 |
} |
|
| 67 | 72 |
switch(static_cast<BufferInfo::Type>(currentIndex.data(NetworkModel::BufferTypeRole).toInt())) {
|
| 68 | 73 |
case BufferInfo::ChannelBuffer: |
| 69 | 74 |
{ // scope is needed for local var declaration
|