diff options
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index eb94cbd..1244273 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -2939,6 +2939,7 @@ EntryUpdateScrollbar( int code; double first, last; Tcl_Interp *interp; + Tcl_DString buf; if (entryPtr->scrollCmd == NULL) { return; @@ -2949,8 +2950,14 @@ EntryUpdateScrollbar( EntryVisibleRange(entryPtr, &first, &last); Tcl_PrintDouble(NULL, first, firstStr); Tcl_PrintDouble(NULL, last, lastStr); - code = Tcl_VarEval(interp, entryPtr->scrollCmd, " ", firstStr, " ", - lastStr, NULL); + Tcl_DStringInit(&buf); + Tcl_DStringAppend(&buf, entryPtr->scrollCmd, -1); + Tcl_DStringAppend(&buf, " ", -1); + Tcl_DStringAppend(&buf, firstStr, -1); + Tcl_DStringAppend(&buf, " ", -1); + Tcl_DStringAppend(&buf, lastStr, -1); + code = Tcl_EvalEx(interp, Tcl_DStringValue(&buf), -1, 0); + Tcl_DStringFree(&buf); if (code != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (horizontal scrolling command executed by %s)", |