forked from qt-creator/qt-creator
Editor: paint indent marker for blocks containing only spaces
Results in a cleaner look since the indent marker are not interrupted on lines that are for code formatting reasons empty. Change-Id: I887071715e0224210684d131a93b3799f8504501 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -4335,7 +4335,11 @@ void TextEditorWidgetPrivate::paintIndentDepth(PaintEventData &data,
|
||||
|
||||
const QString text = data.block.text();
|
||||
const TabSettings &tabSettings = m_document->tabSettings();
|
||||
const int currentDepth = tabSettings.indentationColumn(text);
|
||||
int currentDepth = -1;
|
||||
if (text.simplified().isEmpty())
|
||||
currentDepth = m_document->indenter()->indentFor(data.block, tabSettings);
|
||||
if (currentDepth < 0)
|
||||
currentDepth = tabSettings.indentationColumn(text);
|
||||
|
||||
if (currentDepth <= tabSettings.m_indentSize || blockData.layout->lineCount() < 1)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user