diff --git a/spyderlib/widgets/helperwidgets.py b/spyderlib/widgets/helperwidgets.py
index <HASH>..<HASH> 100644
--- a/spyderlib/widgets/helperwidgets.py
+++ b/spyderlib/widgets/helperwidgets.py
@@ -137,7 +137,6 @@ class HTMLDelegate(QStyledItemDelegate):
 
         doc = QTextDocument()
         doc.setHtml(options.text)
-        doc.setTextWidth(options.rect.width())
 
         return QSize(doc.idealWidth(), doc.size().height())
File switcher: Remove option that was making it to not highlight correctly some entries