diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-11-19 21:41:31 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2015-11-19 21:41:31 (GMT) |
commit | ae5a551ea90e295489c9b93879ddd911615e0536 (patch) | |
tree | fdc97ede76e8c4c53a30ae7a94fcc2ac4d623f93 /generic/tkTextDisp.c | |
parent | d7e64d08df9fe0539c308b04f9a33201faa188f5 (diff) | |
download | tk-ae5a551ea90e295489c9b93879ddd911615e0536.zip tk-ae5a551ea90e295489c9b93879ddd911615e0536.tar.gz tk-ae5a551ea90e295489c9b93879ddd911615e0536.tar.bz2 |
Code Formatting
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index d31d2f3..a18e2b9 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -2945,15 +2945,17 @@ AsyncUpdateLineMetrics( * above). If there is a registered command, run that first. */ - if (textPtr->linesUpdatedCmd != NULL) { - Tcl_Preserve((ClientData)textPtr->interp); - int code = Tcl_EvalObjEx(textPtr->interp, textPtr->linesUpdatedCmd, TCL_EVAL_GLOBAL); - if (code != TCL_OK && code != TCL_CONTINUE + if (textPtr->afterSyncCmd != NULL) { + Tcl_Preserve((ClientData)textPtr->interp); + int code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL); + if (code != TCL_OK && code != TCL_CONTINUE && code != TCL_BREAK) { Tcl_AddErrorInfo(textPtr->interp, "\n (text yupdate)"); Tcl_BackgroundError(textPtr->interp); - } - Tcl_Release((ClientData)textPtr->interp); + } + Tcl_Release((ClientData)textPtr->interp); + Tcl_DecrRefCount(textPtr->afterSyncCmd); + textPtr->afterSyncCmd = 0; } textPtr->refCount--; |