forked from qt-creator/qt-creator
PLain Text Editor: Remove list indentation
As it causes dashed lists to be formatted as
- i1
- i2
Just do paragraph formatting.
Task-number: QTCREATORBUG-538
Initial-patch-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
(cherry picked from commit 2986ccafd2
)
This commit is contained in:
committed by
Thorbjørn Lindeijer
parent
d510aaa029
commit
a3fd049ec8
@@ -109,11 +109,10 @@ void PlainTextEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar ty
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Just use previous line.
|
// Just use previous line.
|
||||||
// Skip non-alphanumerical characters when determining the indentation
|
// Skip blank characters when determining the indentation
|
||||||
// to enable writing bulleted lists whose items span several lines.
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (i < previousText.size()) {
|
while (i < previousText.size()) {
|
||||||
if (previousText.at(i).isLetterOrNumber()) {
|
if (!previousText.at(i).isSpace()) {
|
||||||
const TextEditor::TabSettings &ts = tabSettings();
|
const TextEditor::TabSettings &ts = tabSettings();
|
||||||
ts.indentLine(block, ts.columnAt(previousText, i));
|
ts.indentLine(block, ts.columnAt(previousText, i));
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user