⛏️ index : haiku.git

author Michael Lotz <mmlr@mlotz.ch> 2009-09-11 0:53:56.0 +00:00:00
committer Michael Lotz <mmlr@mlotz.ch> 2009-09-11 0:53:56.0 +00:00:00
commit
eb96a6db43a366dfd066cf93f62f7bc091de6f2e [patch]
tree
0dbf084fc49936325d18649d703b12b9b7db6b43
parent
54d72a6bd147115bdd434607ad20cdd7fce3d49c
download
eb96a6db43a366dfd066cf93f62f7bc091de6f2e.tar.gz

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

Diff

 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);