r1317 - trunk/js
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Wed Jun 1 17:31:48 2005
New Revision: 1317
Modified:
trunk/js/bxeFunctions.js
Log:
fix for http://cvs.wyona.org/cgi-bin/bugzilla/show_bug.cgi?id=3581
"problems with more than 5 undos and then redo"
Modified: trunk/js/bxeFunctions.js
==============================================================================
--- trunk/js/bxeFunctions.js (original)
+++ trunk/js/bxeFunctions.js Wed Jun 1 17:31:48 2005
@@ -144,7 +144,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;}
@@ -171,7 +170,6 @@
}
function bxe_history_undo() {
-
if (bxe_snapshots_position >= 0) {
if (bxe_snapshots_position == bxe_snapshots_last) {
var currXmlStr = bxe_history_snapshot();
@@ -182,10 +180,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