summaryrefslogtreecommitdiffstats
path: root/generic/tkUndo.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkUndo.c')
-rw-r--r--generic/tkUndo.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/generic/tkUndo.c b/generic/tkUndo.c
index 5934154..c66905d 100644
--- a/generic/tkUndo.c
+++ b/generic/tkUndo.c
@@ -495,17 +495,7 @@ int
TkUndoCanRedo(
TkUndoRedoStack *stack) /* An Undo/Redo stack */
{
- int canRedo = 0;
- TkUndoAtom *elem = stack->redoStack;
-
- while (elem != NULL) {
- if (elem->type != TK_UNDO_SEPARATOR) {
- canRedo = 1;
- break;
- }
- elem = elem->next;
- }
- return canRedo;
+ return stack->redoStack != NULL;
}
/*
@@ -528,17 +518,7 @@ int
TkUndoCanUndo(
TkUndoRedoStack *stack) /* An Undo/Redo stack */
{
- int canUndo = 0;
- TkUndoAtom *elem = stack->undoStack;
-
- while (elem != NULL) {
- if (elem->type != TK_UNDO_SEPARATOR) {
- canUndo = 1;
- break;
- }
- elem = elem->next;
- }
- return canUndo;
+ return stack->undoStack != NULL;
}
/*