diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-22 11:44:36 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-22 11:44:36 (GMT) |
commit | 314ca5019e04ec53c1ea17f8f7443f6eac02a5ba (patch) | |
tree | 631aa047f593787a41cd55d8be0fdcec04984c76 /generic/tkText.c | |
parent | 63504284a60a6ae199422ecb41637700339cd333 (diff) | |
parent | de3f6dd4ea12576354f6128c2c982bb648c53f64 (diff) | |
download | tk-314ca5019e04ec53c1ea17f8f7443f6eac02a5ba.zip tk-314ca5019e04ec53c1ea17f8f7443f6eac02a5ba.tar.gz tk-314ca5019e04ec53c1ea17f8f7443f6eac02a5ba.tar.bz2 |
Fix test-case bind-27.2 on X11 (it worked on win32)bug_38dc27bd1d0ecd68
Merge trunk.
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 3079417..76251c0 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2253,12 +2253,20 @@ ConfigureText( * replaced in the widget record. */ - textPtr->selTagPtr->border = textPtr->selBorder; + if (textPtr->selTagPtr->selBorder == NULL) { + textPtr->selTagPtr->border = textPtr->selBorder; + } else { + textPtr->selTagPtr->selBorder = textPtr->selBorder; + } if (textPtr->selTagPtr->borderWidthPtr != textPtr->selBorderWidthPtr) { textPtr->selTagPtr->borderWidthPtr = textPtr->selBorderWidthPtr; textPtr->selTagPtr->borderWidth = textPtr->selBorderWidth; } - textPtr->selTagPtr->fgColor = textPtr->selFgColorPtr; + if (textPtr->selTagPtr->selFgColor == NULL) { + textPtr->selTagPtr->fgColor = textPtr->selFgColorPtr; + } else { + textPtr->selTagPtr->selFgColor = textPtr->selFgColorPtr; + } textPtr->selTagPtr->affectsDisplay = 0; textPtr->selTagPtr->affectsDisplayGeometry = 0; if ((textPtr->selTagPtr->elideString != NULL) @@ -2277,12 +2285,18 @@ ConfigureText( textPtr->selTagPtr->affectsDisplayGeometry = 1; } if ((textPtr->selTagPtr->border != NULL) + || (textPtr->selTagPtr->selBorder != NULL) || (textPtr->selTagPtr->reliefString != NULL) || (textPtr->selTagPtr->bgStipple != None) || (textPtr->selTagPtr->fgColor != NULL) + || (textPtr->selTagPtr->selFgColor != NULL) || (textPtr->selTagPtr->fgStipple != None) || (textPtr->selTagPtr->overstrikeString != NULL) - || (textPtr->selTagPtr->underlineString != NULL)) { + || (textPtr->selTagPtr->overstrikeColor != NULL) + || (textPtr->selTagPtr->underlineString != NULL) + || (textPtr->selTagPtr->underlineColor != NULL) + || (textPtr->selTagPtr->lMarginColor != NULL) + || (textPtr->selTagPtr->rMarginColor != NULL)) { textPtr->selTagPtr->affectsDisplay = 1; } TkTextRedrawTag(NULL, textPtr, NULL, NULL, textPtr->selTagPtr, 1); @@ -3016,7 +3030,7 @@ CountIndices( * If 'viewUpdate' is true, we may adjust the window contents' * y-position, and scrollbar setting. * - * If 'viewUpdate' is false, true we can guarantee that textPtr->topIndex + * If 'viewUpdate' is true we can guarantee that textPtr->topIndex * points to a valid TkTextLine after this function returns. However, if * 'viewUpdate' is false, then there is no such guarantee (since * topIndex.linePtr can be garbage). The caller is expected to take |