diff options
author | fvogel <fvogelnew1@free.fr> | 2015-11-14 09:11:48 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-11-14 09:11:48 (GMT) |
commit | 4fe451bdce628ec817ecdebadbcd7f46dc967b41 (patch) | |
tree | 5de798bb84f6fa0d65abeb57ebcc8969af5b1968 /generic/tkText.c | |
parent | c3b96f601ce76e221a2dbd8fe8d747834c4a48ec (diff) | |
download | tk-4fe451bdce628ec817ecdebadbcd7f46dc967b41.zip tk-4fe451bdce628ec817ecdebadbcd7f46dc967b41.tar.gz tk-4fe451bdce628ec817ecdebadbcd7f46dc967b41.tar.bz2 |
TIP #438 - [.text pendingyupdate] command added, with corresponding new tests
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 4d2df7e..36bb4d4 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -689,15 +689,16 @@ TextWidgetObjCmd( static const char *optionStrings[] = { "bbox", "cget", "compare", "configure", "count", "debug", "delete", "dlineinfo", "dump", "edit", "get", "image", "index", "insert", - "mark", "peer", "replace", "scan", "search", "see", "tag", "window", - "xview", "yupdate", "yview", NULL + "mark", "peer", "pendingyupdate", "replace", "scan", "search", + "see", "tag", "window", "xview", "yupdate", "yview", NULL }; enum options { TEXT_BBOX, TEXT_CGET, TEXT_COMPARE, TEXT_CONFIGURE, TEXT_COUNT, TEXT_DEBUG, TEXT_DELETE, TEXT_DLINEINFO, TEXT_DUMP, TEXT_EDIT, TEXT_GET, TEXT_IMAGE, TEXT_INDEX, TEXT_INSERT, TEXT_MARK, - TEXT_PEER, TEXT_REPLACE, TEXT_SCAN, TEXT_SEARCH, TEXT_SEE, - TEXT_TAG, TEXT_WINDOW, TEXT_XVIEW, TEXT_YUPDATE, TEXT_YVIEW + TEXT_PEER, TEXT_PENDINGYUPDATE, TEXT_REPLACE, TEXT_SCAN, + TEXT_SEARCH, TEXT_SEE, TEXT_TAG, TEXT_WINDOW, TEXT_XVIEW, + TEXT_YUPDATE, TEXT_YVIEW }; if (objc < 2) { @@ -1372,6 +1373,18 @@ TextWidgetObjCmd( case TEXT_PEER: result = TextPeerCmd(textPtr, interp, objc, objv); break; + case TEXT_PENDINGYUPDATE: { + int number; + + if (objc != 2) { + Tcl_WrongNumArgs(interp, 2, objv, NULL); + result = TCL_ERROR; + goto done; + } + number = TkTextPendingyupdate(textPtr); + Tcl_SetObjResult(interp, Tcl_NewIntObj(number)); + break; + } case TEXT_REPLACE: { const TkTextIndex *indexFromPtr, *indexToPtr; |