summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-01-06 13:53:50 +0100
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-01-06 14:37:39 +0100
commita3fd049ec83e49d33d0d0486fd4f9d6c36eac718 (patch)
treef1770670495a6776d313ac877e12678b0c5657b3
parentd510aaa02952689a3ce6f27b2d786148ce27e665 (diff)
downloadqt-creator-a3fd049ec83e49d33d0d0486fd4f9d6c36eac718.tar.gz
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 2986ccafd22f07bbd631d015e141ec05fda1a3d5)
-rw-r--r--src/plugins/texteditor/plaintexteditor.cpp5
1 files 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;