diff options
author | fvogel <fvogelnew1@free.fr> | 2016-06-07 21:04:51 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-06-07 21:04:51 (GMT) |
commit | eb3fa653566d6bf130804d7d800f960d72819597 (patch) | |
tree | 95734d5137dcd36dd2454f5d4363a98c76d70017 /generic/tkText.c | |
parent | eb088d2b82cc6d7ed5b4b5a4f553c603cab1a2de (diff) | |
download | tk-eb3fa653566d6bf130804d7d800f960d72819597.zip tk-eb3fa653566d6bf130804d7d800f960d72819597.tar.gz tk-eb3fa653566d6bf130804d7d800f960d72819597.tar.bz2 |
Possible solution for [1217222] - [.text edit undo/redo] return ranges of modified characters
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index b610844..d101364 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2781,6 +2781,7 @@ TextPushUndoAction( Tcl_Obj *markSet2InsertObj = NULL; Tcl_Obj *insertCmdObj = Tcl_NewObj(); Tcl_Obj *deleteCmdObj = Tcl_NewObj(); + Tcl_Obj *returnCmdObj = Tcl_NewObj(); /* * Get the index positions. @@ -2830,6 +2831,11 @@ TextPushUndoAction( Tcl_ListObjAppendElement(NULL, deleteCmdObj, index1Obj); Tcl_ListObjAppendElement(NULL, deleteCmdObj, index2Obj); + Tcl_ListObjAppendElement(NULL, returnCmdObj, + Tcl_NewStringObj("list", 4)); + Tcl_ListObjAppendElement(NULL, returnCmdObj, index1Obj); + Tcl_ListObjAppendElement(NULL, returnCmdObj, index2Obj); + /* * Note: we don't wish to use textPtr->widgetCmd in these callbacks * because if we delete the textPtr, but peers still exist, we will then @@ -2847,11 +2853,13 @@ TextPushUndoAction( insertCmdObj, NULL); TkUndoMakeCmdSubAtom(NULL, markSet2InsertObj, iAtom); TkUndoMakeCmdSubAtom(NULL, seeInsertObj, iAtom); + TkUndoMakeCmdSubAtom(NULL, returnCmdObj, iAtom); dAtom = TkUndoMakeSubAtom(&TextUndoRedoCallback, textPtr->sharedTextPtr, deleteCmdObj, NULL); TkUndoMakeCmdSubAtom(NULL, markSet1InsertObj, dAtom); TkUndoMakeCmdSubAtom(NULL, seeInsertObj, dAtom); + TkUndoMakeCmdSubAtom(NULL, returnCmdObj, dAtom); Tcl_DecrRefCount(seeInsertObj); Tcl_DecrRefCount(index1Obj); |