From eb96a6db43a366dfd066cf93f62f7bc091de6f2e Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 11 Sep 2009 00:53:56 +0000 Subject: [PATCH] Merging BTextView autoindent fixes from r32993 in trunk. git-svn-id: file:///srv/svn/repos/haiku/haiku/branches/releases/r1alpha1@33052 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index b11b696..37c4a75 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -3627,14 +3627,13 @@ start = offset = OffsetAt(_LineAt(fSelStart)); while (ByteAt(offset) != '\0' && - (ByteAt(offset) == B_TAB || ByteAt(offset) == B_SPACE)) + (ByteAt(offset) == B_TAB || ByteAt(offset) == B_SPACE) + && offset < fSelStart) offset++; + _DoInsertText(bytes, numBytes, fSelStart, NULL); if (start != offset) _DoInsertText(Text() + start, offset - start, fSelStart, NULL); - - _DoInsertText(bytes, numBytes, fSelStart, NULL); - } else _DoInsertText(bytes, numBytes, fSelStart, NULL); -- gitore 0.2.3