diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 1b6765683a5..8af95a69825 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3779,8 +3779,12 @@ void BaseTextEditor::setDisplaySettings(const DisplaySettings &ds) } d->m_displaySettings = ds; - d->extraAreaHighlightCollapseBlockNumber = d->extraAreaHighlightCollapseColumn = -1; - d->m_highlightBlocksInfo = BaseTextEditorPrivateHighlightBlocks(); + if (!ds.m_highlightBlocks) { + d->extraAreaHighlightCollapseBlockNumber = d->extraAreaHighlightCollapseColumn = -1; + d->m_highlightBlocksInfo = BaseTextEditorPrivateHighlightBlocks(); + } + + slotCursorPositionChanged(); viewport()->update(); extraArea()->update(); }