Import Tk 8.6.10

This commit is contained in:
Steve Dower
2020-09-24 22:55:34 +01:00
parent 5ba5cbc9af
commit 42c69189d9
365 changed files with 24323 additions and 12832 deletions

View File

@@ -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;
@@ -1547,7 +1546,7 @@ TextWidgetObjCmd(
textPtr->afterSyncCmd = cmd;
} else {
textPtr->afterSyncCmd = cmd;
Tcl_DoWhenIdle(RunAfterSyncCmd, (ClientData) textPtr);
Tcl_DoWhenIdle(TkTextRunAfterSyncCmd, (ClientData) textPtr);
}
break;
} else if (objc != 2) {
@@ -1559,7 +1558,7 @@ TextWidgetObjCmd(
Tcl_DecrRefCount(textPtr->afterSyncCmd);
}
textPtr->afterSyncCmd = NULL;
TkTextUpdateLineMetrics(textPtr, 1,
TkTextUpdateLineMetrics(textPtr, 0,
TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr), -1);
break;
}
@@ -2278,7 +2277,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)
@@ -4928,7 +4927,7 @@ DumpLine(
TkTextEmbWindow *ewPtr = &segPtr->body.ew;
const char *pathname;
if (ewPtr->tkwin == (Tk_Window) NULL) {
if (ewPtr->tkwin == NULL) {
pathname = "";
} else {
pathname = Tk_PathName(ewPtr->tkwin);
@@ -5506,7 +5505,7 @@ UpdateDirtyFlag(
/*
*----------------------------------------------------------------------
*
* RunAfterSyncCmd --
* TkTextRunAfterSyncCmd --
*
* This function is called by the event loop and executes the command
* scheduled by [.text sync -command $cmd].
@@ -5520,8 +5519,8 @@ UpdateDirtyFlag(
*----------------------------------------------------------------------
*/
static void
RunAfterSyncCmd(
void
TkTextRunAfterSyncCmd(
ClientData clientData) /* Information about text widget. */
{
register TkText *textPtr = (TkText *) clientData;