Index: _source/plugins/list/plugin.js
===================================================================
--- _source/plugins/list/plugin.js	(revision 3914)
+++ _source/plugins/list/plugin.js	Fri Jul 17 22:09:38 CST 2009
@@ -499,7 +499,8 @@
 				var mergeSibling, listCommand = this;
 				( mergeSibling = function( rtl ){
 
-					var sibling = listNode[ rtl ? 'getPrevious' : 'getNext' ].call( listNode, true );
+					var sibling = listNode[ rtl ?
+						'getPrevious' : 'getNext' ]( CKEDITOR.dom.walker.whitespaces( true ) );
 					if ( sibling && sibling.getName &&
 					     sibling.getName() == listCommand.type )
 					{
Index: _source/plugins/wysiwygarea/plugin.js
===================================================================
--- _source/plugins/wysiwygarea/plugin.js	(revision 3912)
+++ _source/plugins/wysiwygarea/plugin.js	Fri Jul 17 22:18:14 CST 2009
@@ -166,8 +166,9 @@
 			var children = fixedBlock.getChildren(),
 				count = children.count(),
 				firstChild,
-				previousElement = fixedBlock.getPrevious( true ),
-				nextElement = fixedBlock.getNext( true ),
+				whitespaceGuard = CKEDITOR.dom.walker.whitespaces( true ),
+				previousElement = fixedBlock.getPrevious( whitespaceGuard ),
+				nextElement = fixedBlock.getNext( whitespaceGuard ),
 				enterBlock;
 			if ( previousElement && previousElement.getName
 				 && !( previousElement.getName() in nonExitableElementNames ) )
Index: _source/tests/core/dom/node.html
===================================================================
--- _source/tests/core/dom/node.html	(revision 3532)
+++ _source/tests/core/dom/node.html	Fri Jul 17 22:09:38 CST 2009
@@ -114,6 +114,32 @@
 			assert.areSame( CKEDITOR.POSITION_PRECEDING, node1.getPosition( node2 ) );
 		},
 
+		// Test get previous non-spaces node.
+		test_getPrevious : function()
+		{
+			var element = new CKEDITOR.dom.element( document.getElementById( 'append' ) );
+			var span1 = new CKEDITOR.dom.element( 'span' );
+			element.append( span1 );
+			element.append( new CKEDITOR.dom.text( ' ' ) );
+			var span2 = new CKEDITOR.dom.element( 'span' );
+			element.append( span2 );
+			var previous = span2.getPrevious( CKEDITOR.dom.walker.whitespaces( true ) );
+			assert.areSame( span1.$, previous.$ );
+		},
+
+		// Test get next non-spaces node.
+		test_getNext : function()
+		{
+			var element = new CKEDITOR.dom.element( document.getElementById( 'append' ) );
+			var span1 = new CKEDITOR.dom.element( 'span' );
+			element.append( span1 );
+			element.append( new CKEDITOR.dom.text( ' ' ) );
+			var span2 = new CKEDITOR.dom.element( 'span' );
+			element.append( span2 );
+			var next = span1.getNext( CKEDITOR.dom.walker.whitespaces( true ) );
+			assert.areSame( span1.$, next.$ );
+		},
+		
 		name : document.title
 	};
 })() );
@@ -135,5 +161,6 @@
 		<p><b>Sample</b> <i>Text</i></p>
 	</div>
 	<span>Another</span>
+	<p id="append"></p>
 </body>
 </html>
Index: _source/core/dom/node.js
===================================================================
--- _source/core/dom/node.js	(revision 3914)
+++ _source/core/dom/node.js	Fri Jul 17 22:17:20 CST 2009
@@ -350,34 +350,37 @@
 			return node;
 		},
 
-		getPrevious : function( ignoreSpaces )
+		getPrevious : function( evaluator )
 		{
-			var previous = this.$.previousSibling;
-			while ( ignoreSpaces && previous && ( previous.nodeType == CKEDITOR.NODE_TEXT )
-					&& !CKEDITOR.tools.trim( previous.nodeValue ) )
+			var previous = this.$, retval;
+			do
+			{
 				previous = previous.previousSibling;
-
-			return previous ? new CKEDITOR.dom.node( previous ) : null;
+				retval = previous && new CKEDITOR.dom.node( previous );
+			}
+			while ( retval && evaluator && !evaluator( retval ) )
+			return retval;
 		},
 
 		/**
 		 * Gets the node that follows this element in its parent's child list.
-		 * @param {Boolean} ignoreSpaces Whether should ignore empty text nodes.
-		 * @returns {CKEDITOR.dom.node} The next node or null if not
-		 *		available.
+		 * @param {Function} evaluator Filtering the result node.
+		 * @returns {CKEDITOR.dom.node} The next node or null if not available.
 		 * @example
 		 * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt; &lt;i&gt;next&lt;/i&gt;&lt;/div&gt;' );
 		 * var first = <b>element.getFirst().getNext()</b>;
 		 * alert( first.getName() );  // "i"
 		 */
-		getNext : function( ignoreSpaces )
+		getNext : function( evaluator )
 		{
-			var next = this.$.nextSibling;
-			while ( ignoreSpaces && next && ( next.nodeType == CKEDITOR.NODE_TEXT )
-				  && !CKEDITOR.tools.trim( next.nodeValue ) )
+			var next = this.$, retval;
+			do
+			{
 				next = next.nextSibling;
-
-			return next ? new CKEDITOR.dom.node( next ) : null;
+				retval = next && new CKEDITOR.dom.node( next );
+			}
+			while ( retval && evaluator && !evaluator( retval ) )
+			return retval;
 		},
 
 		/**
Index: _source/plugins/domiterator/plugin.js
===================================================================
--- _source/plugins/domiterator/plugin.js	(revision 3926)
+++ _source/plugins/domiterator/plugin.js	Fri Jul 17 22:09:38 CST 2009
@@ -311,11 +311,16 @@
 
 			if ( removeLastBr )
 			{
+				// Ignore bookmark nodes.(#3783)
+				var bookmarkGuard = CKEDITOR.dom.walker.bookmark( false, true );
+
 				var lastChild = block.getLast();
 				if ( lastChild && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.getName() == 'br' )
 				{
 					// Take care not to remove the block expanding <br> in non-IE browsers.
-					if ( CKEDITOR.env.ie || lastChild.getPrevious() || lastChild.getNext() )
+					if ( CKEDITOR.env.ie
+						 || lastChild.getPrevious( bookmarkGuard )
+						 || lastChild.getNext( bookmarkGuard ) )
 						lastChild.remove();
 				}
 			}
Index: _source/plugins/indent/plugin.js
===================================================================
--- _source/plugins/indent/plugin.js	(revision 3914)
+++ _source/plugins/indent/plugin.js	Fri Jul 17 22:09:38 CST 2009
@@ -42,7 +42,7 @@
 				return setState.call( this, editor, CKEDITOR.TRISTATE_OFF );
 			else
 			{
-				while ( listItem && ( listItem = listItem.getPrevious() ) )
+				while ( listItem && ( listItem = listItem.getPrevious( CKEDITOR.dom.walker.whitespaces( true ) ) ) )
 				{
 					if ( listItem.getName && listItem.getName() == 'li' )
 						return setState.call( this, editor, CKEDITOR.TRISTATE_OFF );
Index: _source/core/dom/walker.js
===================================================================
--- _source/core/dom/walker.js	(revision 3607)
+++ _source/core/dom/walker.js	Fri Jul 17 22:09:38 CST 2009
@@ -379,14 +379,28 @@
 
 		return function( node )
 		{
-			var retval, parent;
+			var isBookmark, parent;
 			// Is bookmark inner text node?
-			retval = ( node && !node.getName && ( parent = node.getParent() )
+			isBookmark = ( node && !node.getName && ( parent = node.getParent() )
 						&& isBookmarkNode( parent ) );
 			// Is bookmark node?
-			retval = contentOnly ? retval : retval || isBookmarkNode( node );
-			return isReject ? !retval : !!retval;
+			isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node );
+			return isReject ^ isBookmark;
 		};
 	};
 
+	/**
+	 * Whether the node contains only white-spaces characters.
+	 * @param isReject
+	 */
+	CKEDITOR.dom.walker.whitespaces = function( isReject )
+	{
+		return function( node )
+		{
+			var isWhitespace = node && ( node.type == CKEDITOR.NODE_TEXT )
+							&& !CKEDITOR.tools.trim( node.getText() )
+			return isReject ^ isWhitespace;
+		};
+	}
+
 })();
Index: CHANGES.html
===================================================================
--- CHANGES.html	(revision 3929)
+++ CHANGES.html	Fri Jul 17 22:11:40 CST 2009
@@ -46,6 +46,7 @@
 	<p>
 		Fixed issues:</p>
 	<ul>
+		<li><a href="http://dev.fckeditor.net/ticket/2856">#2856</a> : Fixed problem with inches in Paste From Word plugin.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3929">#3929</a> : Using Paste dialog, 
 			the text is pasted into current selection</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3920">#3920</a> : Mouse cursor over characters in 
@@ -150,6 +151,7 @@
 		<li><a href="http://dev.fckeditor.net/ticket/3973">#3973</a> : Fixed list creation error at the end of document.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3959">#3959</a> : Pasting styled text from word result in content lost.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/3793">#3793</a> : Combined images into sprites.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/3783">#3783</a> : Fixed indenting command in table cells create collapsed paragraph.</li>
 	</ul>
 	<h3>
 		CKEditor 3.0 RC</h3>
