summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Brauch <svenbrauch@googlemail.com>2014-01-20 22:47:40 (GMT)
committerSven Brauch <svenbrauch@googlemail.com>2014-01-20 22:47:52 (GMT)
commit40382e49906be035a2a8ae26d0ea8ef416b3027d (patch)
tree2bd0c0882481f7369f3ee92aa8615148141b9f0d
parentf94748b1987a47006acbe9203a904a8e5a120a7d (diff)
sort completion items which match the capitalization of what was typed first
-rw-r--r--part/completion/katecompletionmodel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/part/completion/katecompletionmodel.cpp b/part/completion/katecompletionmodel.cpp
index fd22387..9f4fa10 100644
--- a/part/completion/katecompletionmodel.cpp
+++ b/part/completion/katecompletionmodel.cpp
@@ -1480,6 +1480,13 @@ bool KateCompletionModel::Item::operator <( const Item & rhs ) const
}
if( ret == 0 ) {
+ const QString& filter = rhs.model->currentCompletion(rhs.m_sourceRow.first);
+ if( m_nameColumn.startsWith(filter, Qt::CaseSensitive) ) {
+ return true;
+ }
+ if( rhs.m_nameColumn.startsWith(filter, Qt::CaseSensitive) ) {
+ return false;
+ }
// FIXME need to define a better default ordering for multiple model display
ret = m_sourceRow.second.row() - rhs.m_sourceRow.second.row();
}