From 6f16f7249b81d3c9e18d476d594ab4eca83c5737 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Thu, 21 Mar 2002 23:20:57 +0000 Subject: [PATCH] fix for 82813: tweaking editor whitespace handling to behave better when deleting in PRE r=brade; sr=kin; a=asa --- editor/libeditor/html/nsWSRunObject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/libeditor/html/nsWSRunObject.cpp b/editor/libeditor/html/nsWSRunObject.cpp index 5b86138162f7..a5c55570d39d 100644 --- a/editor/libeditor/html/nsWSRunObject.cpp +++ b/editor/libeditor/html/nsWSRunObject.cpp @@ -1390,7 +1390,7 @@ nsWSRunObject::PrepareToDeleteRangePriv(nsWSRunObject* aEndObject) NS_ENSURE_SUCCESS(res, res); } // adjust normal ws in afterRun if needed - if (afterRun && (afterRun->mType == eNormalWS)) + if (afterRun && (afterRun->mType == eNormalWS) && !aEndObject->mPRE) { if ( (beforeRun && (beforeRun->mType == eLeadingWS)) || (!beforeRun && ((mStartReason & eBlock) || (mStartReason == eBreak))) ) @@ -1411,7 +1411,7 @@ nsWSRunObject::PrepareToDeleteRangePriv(nsWSRunObject* aEndObject) res = DeleteChars(beforeRun->mStartNode, beforeRun->mStartOffset, mNode, mOffset); NS_ENSURE_SUCCESS(res, res); } - else if (beforeRun && (beforeRun->mType == eNormalWS)) + else if (beforeRun && (beforeRun->mType == eNormalWS) && mPRE) { if ( (afterRun && (afterRun->mType == eTrailingWS)) || (afterRun && (afterRun->mType == eNormalWS)) ||