Index: /FCKeditor/trunk/editor/_source/internals/fckundo.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckundo.js	(revision 635)
+++ /FCKeditor/trunk/editor/_source/internals/fckundo.js	(revision 636)
@@ -78,4 +78,37 @@
 }
 
+FCKUndo._CompareCursors = function( cursor1, cursor2 )
+{
+	for ( var i = 0 ; i < Math.min( cursor1.length, cursor2.length ) ; i++ )
+	{
+		if ( cursor1[i] < cursor2[i] )
+			return -1;
+		else if (cursor1[i] > cursor2[i] )
+			return 1;
+	}
+	if ( cursor1.length < cursor2.length )
+		return -1;
+	else if (cursor1.length > cursor2.length )
+		return 1;
+	return 0;
+}
+
+FCKUndo._CheckIsBookmarksEqual = function( bookmark1, bookmark2 )
+{
+	if ( FCKBrowserInfo.IsIE )
+	{
+		var startOffset1 = bookmark1[1].search( bookmark1[0].StartId ) ;
+		var startOffset2 = bookmark2[1].search( bookmark2[0].StartId ) ;
+		var endOffset1 = bookmark1[1].search( bookmark1[0].EndId ) ;
+		var endOffset2 = bookmark2[1].search( bookmark2[0].EndId ) ;
+		return startOffset1 == startOffset2 && endOffset1 == endOffset2 ;
+	}
+	else
+	{
+		return this._CompareCursors( bookmark1.Start, bookmark2.Start ) == 0 
+			&& this._CompareCursors( bookmark1.End, bookmark2.End ) == 0 ;
+	}
+}
+
 FCKUndo.SaveUndoStep = function()
 {
@@ -90,4 +123,5 @@
 	// Get the HTML content.
 	var sHtml = FCK.EditorDocument.body.innerHTML ;
+	var bookmark = this._GetBookmark() ;
 
 	// Shrink the array to the current level.
@@ -95,10 +129,12 @@
 
 	// Cancel operation if the new step is identical to the previous one.
-	if ( this.CurrentIndex > 0 && sHtml == this.SavedData[ this.CurrentIndex ][0] )
+	if ( this.CurrentIndex > 0 
+			&& sHtml == this.SavedData[ this.CurrentIndex ][0] 
+			&& this._CheckIsBookmarksEqual( bookmark, this.SavedData[ this.CurrentIndex ][1] ) )
 		return ;
 	// Save the selection and caret position in the first undo level for the first change.
 	else if ( this.CurrentIndex == 0 && this.SavedData.length && sHtml == this.SavedData[0][0] )
 	{
-		this.SavedData[0][1] = this._GetBookmark() ;
+		this.SavedData[0][1] = bookmark ;
 		return ;
 	}
@@ -112,5 +148,5 @@
 
 	// Save the new level in front of the actual position.
-	this.SavedData[ this.CurrentIndex ] = [ sHtml, this._GetBookmark() ] ;
+	this.SavedData[ this.CurrentIndex ] = [ sHtml, bookmark ] ;
 
 	FCK.Events.FireEvent( "OnSelectionChange" ) ;
