aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Document.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 56785af78..7eef844ee 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -892,7 +892,7 @@ void * SCI_METHOD Document::ConvertToDocument() {
int Document::Undo() {
int newPos = -1;
CheckReadOnly();
- if (enteredModification == 0) {
+ if ((enteredModification == 0) && (cb.IsCollectingUndo())) {
enteredModification++;
if (!cb.IsReadOnly()) {
bool startSavePoint = cb.IsSavePoint();
@@ -977,7 +977,7 @@ int Document::Undo() {
int Document::Redo() {
int newPos = -1;
CheckReadOnly();
- if (enteredModification == 0) {
+ if ((enteredModification == 0) && (cb.IsCollectingUndo())) {
enteredModification++;
if (!cb.IsReadOnly()) {
bool startSavePoint = cb.IsSavePoint();