From 508584455004bcb4e72e529206315a3bb0796541 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Mon, 1 Jun 2015 17:55:09 -0400 Subject: [PATCH] Added highlighting for completion in name column. --- qutebrowser/completion/completiondelegate.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/qutebrowser/completion/completiondelegate.py b/qutebrowser/completion/completiondelegate.py index 03caa5158..56bf18d34 100644 --- a/qutebrowser/completion/completiondelegate.py +++ b/qutebrowser/completion/completiondelegate.py @@ -196,13 +196,10 @@ class CompletionItemDelegate(QStyledItemDelegate): if index.parent().isValid(): pattern = index.model().pattern - if index.column() == 0 and pattern: - repl = r'\g<0>' - text = re.sub(re.escape(pattern), repl, self._opt.text, - flags=re.IGNORECASE) - self._doc.setHtml(text) - else: - self._doc.setPlainText(self._opt.text) + repl = r'\g<0>' + text = re.sub(re.escape(pattern), repl, self._opt.text, + flags=re.IGNORECASE) + self._doc.setHtml(text) else: self._doc.setHtml('{}'.format(html.escape(self._opt.text)))