From bd34734f1132734e751b7cde5bf6a1f6f5ea7fa8 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 4 Nov 2009 19:25:28 +0000 Subject: [PATCH] fixed regression of r33882 reported by Michael Weirauch: * wrapping must always be possible at a newline! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33886 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index 34f8b319dc..99fc0ef923 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -1949,7 +1949,9 @@ BTextView::CanEndLine(int32 offset) { // TODO: This should be improved using the LocaleKit. uint32 classification = _CharClassification(offset); - if (classification == CHAR_CLASS_END_OF_TEXT) + + // wrapping is always allowed at end of text and at newlines + if (classification == CHAR_CLASS_END_OF_TEXT || ByteAt(offset) == B_ENTER) return true; uint32 nextClassification = _CharClassification(offset + 1);