From a3fd049ec83e49d33d0d0486fd4f9d6c36eac718 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 6 Jan 2010 13:53:50 +0100 Subject: PLain Text Editor: Remove list indentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 2986ccafd22f07bbd631d015e141ec05fda1a3d5) --- src/plugins/texteditor/plaintexteditor.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/plaintexteditor.cpp b/src/plugins/texteditor/plaintexteditor.cpp index 18abafe400..2e4dfe59e7 100644 --- a/src/plugins/texteditor/plaintexteditor.cpp +++ b/src/plugins/texteditor/plaintexteditor.cpp @@ -109,11 +109,10 @@ void PlainTextEditor::indentBlock(QTextDocument *doc, QTextBlock block, QChar ty return; // Just use previous line. - // Skip non-alphanumerical characters when determining the indentation - // to enable writing bulleted lists whose items span several lines. + // Skip blank characters when determining the indentation int i = 0; while (i < previousText.size()) { - if (previousText.at(i).isLetterOrNumber()) { + if (!previousText.at(i).isSpace()) { const TextEditor::TabSettings &ts = tabSettings(); ts.indentLine(block, ts.columnAt(previousText, i)); break; -- cgit v1.2.3