use greedy highlighting
This commit is contained in:
parent
ec8dc35a68
commit
20cdb45da5
@ -198,7 +198,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
|
|||||||
columns_to_filter = index.model().srcmodel.columns_to_filter
|
columns_to_filter = index.model().srcmodel.columns_to_filter
|
||||||
if index.column() in columns_to_filter and pattern:
|
if index.column() in columns_to_filter and pattern:
|
||||||
repl = r'<span class="highlight">\g<0></span>'
|
repl = r'<span class="highlight">\g<0></span>'
|
||||||
text = re.sub(re.escape(pattern).replace(r'\ ', r'|'),
|
text = re.sub(re.escape(pattern).replace(r'\ ', r'.*'),
|
||||||
repl, self._opt.text, flags=re.IGNORECASE)
|
repl, self._opt.text, flags=re.IGNORECASE)
|
||||||
self._doc.setHtml(text)
|
self._doc.setHtml(text)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user