r1318 - branches/bxe_2_0/js

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Wed Jun  1 17:32:33 2005
New Revision: 1318

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
Log:
MFH r1317
fix for http://cvs.wyona.org/cgi-bin/bugzilla/show_bug.cgi?id=3581
"problems with more than 5 undos and then redo"


Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Wed Jun  1 17:32:33 2005
@@ -140,7 +140,6 @@
 }
 
 function bxe_history_redo() {
-	
 	if (bxe_snapshots_position >= 0 && bxe_snapshots[( bxe_snapshots_position + 1)]) {
 		var currXmlStr = bxe_getXmlDocument();
 		if (!currXmlStr) { alert("You're in Source Mode. Not possible to use this button"); return false;} 
@@ -162,7 +161,6 @@
 	
 }
 function bxe_history_undo() {
-	
 	if (bxe_snapshots_position >= 0) {
 		if (bxe_snapshots_position == bxe_snapshots_last) {
 			var currXmlStr = bxe_history_snapshot();
@@ -173,10 +171,12 @@
 		
 		if (!currXmlStr) { alert("You're in Source Mode. Not possible to use this button"); return false;} 
 		var xmlstr = bxe_snapshots[bxe_snapshots_position];
-		bxe_snapshots_position--;
-		while(currXmlStr == xmlstr && bxe_snapshots[bxe_snapshots_position ] ) {
-			xmlstr = bxe_snapshots[bxe_snapshots_position];
+		if (xmlstr) {
 			bxe_snapshots_position--;
+			while(currXmlStr == xmlstr && bxe_snapshots[bxe_snapshots_position ] ) {
+				xmlstr = bxe_snapshots[bxe_snapshots_position];
+				bxe_snapshots_position--;
+			}
 		}
 		
 		if (bxe_snapshots_position < 0) {
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.