Index: /FCKeditor/branches/features/custom_list_command/editor/_source/commandclasses/fcklistcommands.js
===================================================================
--- /FCKeditor/branches/features/custom_list_command/editor/_source/commandclasses/fcklistcommands.js	(revision 791)
+++ /FCKeditor/branches/features/custom_list_command/editor/_source/commandclasses/fcklistcommands.js	(revision 792)
@@ -83,5 +83,4 @@
 						FCKDomTools.SetNodeMarker( markerObj, unmarkedNodes[j], '_FCKDepthCounter', 
 							       topDepth + 1 + j ) ;
-						markedNodes.push( unmarkedNodes[j] ) ;
 					}
 					if ( ancestor._FCKDepthCounter < shallowestNode._FCKDepthCounter )
@@ -103,5 +102,10 @@
 				while ( currentNode != endNode )
 				{
-					if ( currentNode._FCKDepthCounter > shallowest._FCKDepthCounter )
+					var nextNode = null ;
+					if ( currentNode.lastChild )
+						nextNode = FCKDomTools.GetNextSourceNode( currentNode.lastChild ) ;
+					else
+						nextNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
+					if ( currentNode._FCKDepthCounter > shallowestNode._FCKDepthCounter )
 					{
 						var ancestor = currentNode.parentNode ;
@@ -133,5 +137,5 @@
 						currentFragment.appendChild( currentNode ) ;
 					}
-					currentNode = FCKDomTools.GetNextSourceNode( currentNode ) ;
+					currentNode = nextNode ;
 				}
 			}
@@ -153,5 +157,5 @@
 			for ( var i = 0 ; i < itemDocFragments.length ; i++ )
 			{
-				var previousParent = itemDocFragments.firstChild._FCKPreviousParent ;
+				var previousParent = itemDocFragments[i].firstChild._FCKPreviousParent ;
 				var ancestor = previousParent ;
 				//while ( ancestor._FCKDepthCounter <= )
