diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2019-03-05 15:43:30 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2019-03-05 15:43:30 (GMT) |
commit | a48a5b55179978d3f31371c90d9be6eaa6931f17 (patch) | |
tree | 0e35fe157b59d65a921b67ba59db8b9774eaf18c /generic/tkText.c | |
parent | 4ea25ded4fb5e2bcfea51ab015097a9c3faa4b84 (diff) | |
parent | 66463b7f19d9e14296571c368b1a5710c7d455fd (diff) | |
download | tk-a48a5b55179978d3f31371c90d9be6eaa6931f17.zip tk-a48a5b55179978d3f31371c90d9be6eaa6931f17.tar.gz tk-a48a5b55179978d3f31371c90d9be6eaa6931f17.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 280eec8..fc63992 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -406,7 +406,6 @@ static Tcl_Obj * TextGetText(const TkText *textPtr, static void GenerateModifiedEvent(TkText *textPtr); static void GenerateUndoStackEvent(TkText *textPtr); static void UpdateDirtyFlag(TkSharedText *sharedPtr); -static void RunAfterSyncCmd(ClientData clientData); static void TextPushUndoAction(TkText *textPtr, Tcl_Obj *undoString, int insert, const TkTextIndex *index1Ptr, @@ -587,7 +586,7 @@ CreateWidget( textPtr->state = TK_TEXT_STATE_NORMAL; textPtr->relief = TK_RELIEF_FLAT; - textPtr->cursor = None; + textPtr->cursor = NULL; textPtr->charWidth = 1; textPtr->charHeight = 10; textPtr->wrapMode = TEXT_WRAPMODE_CHAR; @@ -1544,7 +1543,7 @@ TextWidgetObjCmd( textPtr->afterSyncCmd = cmd; } else { textPtr->afterSyncCmd = cmd; - Tcl_DoWhenIdle(RunAfterSyncCmd, (ClientData) textPtr); + Tcl_DoWhenIdle(TkTextRunAfterSyncCmd, (ClientData) textPtr); } break; } else if (objc != 2) { @@ -1556,7 +1555,7 @@ TextWidgetObjCmd( Tcl_DecrRefCount(textPtr->afterSyncCmd); } textPtr->afterSyncCmd = NULL; - TkTextUpdateLineMetrics(textPtr, 1, + TkTextUpdateLineMetrics(textPtr, 0, TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr), -1); break; } @@ -2275,7 +2274,7 @@ ConfigureText( textPtr->selTagPtr->affectsDisplay = 0; textPtr->selTagPtr->affectsDisplayGeometry = 0; if ((textPtr->selTagPtr->elideString != NULL) - || (textPtr->selTagPtr->tkfont != None) + || (textPtr->selTagPtr->tkfont != NULL) || (textPtr->selTagPtr->justifyString != NULL) || (textPtr->selTagPtr->lMargin1String != NULL) || (textPtr->selTagPtr->lMargin2String != NULL) @@ -5587,7 +5586,7 @@ UpdateDirtyFlag( /* *---------------------------------------------------------------------- * - * RunAfterSyncCmd -- + * TkTextRunAfterSyncCmd -- * * This function is called by the event loop and executes the command * scheduled by [.text sync -command $cmd]. @@ -5601,8 +5600,8 @@ UpdateDirtyFlag( *---------------------------------------------------------------------- */ -static void -RunAfterSyncCmd( +void +TkTextRunAfterSyncCmd( ClientData clientData) /* Information about text widget. */ { register TkText *textPtr = clientData; @@ -5623,7 +5622,7 @@ RunAfterSyncCmd( code = Tcl_EvalObjEx(textPtr->interp, textPtr->afterSyncCmd, TCL_EVAL_GLOBAL); if (code == TCL_ERROR) { Tcl_AddErrorInfo(textPtr->interp, "\n (text sync)"); - Tcl_BackgroundError(textPtr->interp); + Tcl_BackgroundException(textPtr->interp, TCL_ERROR); } Tcl_Release((ClientData) textPtr->interp); Tcl_DecrRefCount(textPtr->afterSyncCmd); |