summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-07-06 17:00:05 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-07-06 17:00:05 (GMT)
commitbf98687ae68fe39f9b67d9cd3c1553bfdd43bf7b (patch)
tree6394f32e83be9b0c5fe08341ff25e6e1f1b7abb8 /generic/tkText.c
parentc6333aba37203822399af655bd8eb008c6c154ec (diff)
downloadtk-bf98687ae68fe39f9b67d9cd3c1553bfdd43bf7b.zip
tk-bf98687ae68fe39f9b67d9cd3c1553bfdd43bf7b.tar.gz
tk-bf98687ae68fe39f9b67d9cd3c1553bfdd43bf7b.tar.bz2
The undo marks identifier is now a member of textPtr->sharedTextPtr. This makes results of test text-8.22 independant of previous undo/redo actions on other text widgets.
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 4195238..6b90a23 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -2774,7 +2774,6 @@ TextPushUndoAction(
{
TkUndoSubAtom *iAtom, *dAtom;
int canUndo, canRedo;
- static int undoMarkId = -1;
char lMarkName[20] = "tk::undoMarkL";
char rMarkName[20] = "tk::undoMarkR";
char stringUndoMarkId[7] = "";
@@ -2848,8 +2847,8 @@ TextPushUndoAction(
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,
Tcl_NewStringObj("set", 3));
markSetRUndoMarkCmdObj = Tcl_DuplicateObj(markSetLUndoMarkCmdObj);
- undoMarkId++;
- sprintf(stringUndoMarkId, "%d", undoMarkId);
+ textPtr->sharedTextPtr->undoMarkId++;
+ sprintf(stringUndoMarkId, "%d", textPtr->sharedTextPtr->undoMarkId);
strcat(lMarkName, stringUndoMarkId);
strcat(rMarkName, stringUndoMarkId);
Tcl_ListObjAppendElement(NULL, markSetLUndoMarkCmdObj,