diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-07-11 14:46:28 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-07-11 14:46:28 (GMT) |
commit | cc1227d6d930a024f7b8ce22f70265a2020f625d (patch) | |
tree | 53401ad2bde16eeae0aad7aa6ae999ab183f7d0f /generic | |
parent | b796c89cc1a4732b7009ddd6d4eebfc41378f38f (diff) | |
parent | 47a7d357fcba6b6d2898e876f9e9a5403ff4e22f (diff) | |
download | tk-cc1227d6d930a024f7b8ce22f70265a2020f625d.zip tk-cc1227d6d930a024f7b8ce22f70265a2020f625d.tar.gz tk-cc1227d6d930a024f7b8ce22f70265a2020f625d.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkText.c | 4 | ||||
-rw-r--r-- | generic/tkTextDisp.c | 4 | ||||
-rw-r--r-- | generic/tkTextMark.c | 38 | ||||
-rw-r--r-- | generic/tkTextTag.c | 4 |
4 files changed, 27 insertions, 23 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 19b4d99..782c136 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2268,7 +2268,9 @@ ConfigureText( || (textPtr->selTagPtr->tabStringPtr != NULL) || (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR) || (textPtr->selTagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR) - || (textPtr->selTagPtr->wrapMode != TEXT_WRAPMODE_NULL)) { + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_CHAR) + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (textPtr->selTagPtr->wrapMode == TEXT_WRAPMODE_WORD)) { textPtr->selTagPtr->affectsDisplay = 1; textPtr->selTagPtr->affectsDisplayGeometry = 1; } diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 027efc8..66766ea 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -985,8 +985,8 @@ GetStyle( styleValues.elide = tagPtr->elide > 0; elidePrio = tagPtr->priority; } - if ((tagPtr->wrapMode != TEXT_WRAPMODE_NULL) - && (tagPtr->priority > wrapPrio)) { + if (((tagPtr->wrapMode == TEXT_WRAPMODE_CHAR) || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD)) && (tagPtr->priority > wrapPrio)) { styleValues.wrapMode = tagPtr->wrapMode; wrapPrio = tagPtr->priority; } diff --git a/generic/tkTextMark.c b/generic/tkTextMark.c index db1dec1..2339ed0 100644 --- a/generic/tkTextMark.c +++ b/generic/tkTextMark.c @@ -301,7 +301,7 @@ TkTextSetMark( if (markPtr == textPtr->insertMarkPtr) { TkTextIndex index, index2; - int nblines; + int nblines; TkTextMarkSegToIndex(textPtr, textPtr->insertMarkPtr, &index); TkTextIndexForwChars(NULL, &index, 1, &index2, COUNT_INDICES); @@ -313,12 +313,12 @@ TkTextSetMark( TkTextChanged(NULL, textPtr, &index, &index2); - /* - * The number of lines in the widget is zero if and only if it is - * a partial peer with -startline == -endline, i.e. an empty - * peer. In this case the mark shall be set exactly at the given - * index, and not one character backwards (bug 3487407). - */ + /* + * The number of lines in the widget is zero if and only if it is + * a partial peer with -startline == -endline, i.e. an empty + * peer. In this case the mark shall be set exactly at the given + * index, and not one character backwards (bug 3487407). + */ nblines = TkBTreeNumLines(textPtr->sharedTextPtr->tree, textPtr); if ((TkBTreeLinesTo(textPtr, indexPtr->linePtr) == nblines) @@ -436,7 +436,7 @@ TkTextMarkNameToIndex( TkTextSegment *segPtr; if (textPtr == NULL) { - return TCL_ERROR; + return TCL_ERROR; } if (!strcmp(name, "insert")) { @@ -749,7 +749,7 @@ MarkCheckProc( */ if (markPtr->body.mark.textPtr->insertMarkPtr == markPtr) { - return; + return; } if (markPtr->body.mark.textPtr->currentMarkPtr == markPtr) { return; @@ -933,16 +933,16 @@ MarkFindPrev( seg2Ptr = seg2Ptr->nextPtr) { if (seg2Ptr->typePtr == &tkTextRightMarkType || seg2Ptr->typePtr == &tkTextLeftMarkType) { - if (seg2Ptr->body.mark.hPtr == NULL) { - if (seg2Ptr != textPtr->currentMarkPtr && - seg2Ptr != textPtr->insertMarkPtr) { - /* - * This is an insert or current mark from a - * peer of textPtr. - */ - continue; - } - } + if (seg2Ptr->body.mark.hPtr == NULL) { + if (seg2Ptr != textPtr->currentMarkPtr && + seg2Ptr != textPtr->insertMarkPtr) { + /* + * This is an insert or current mark from a + * peer of textPtr. + */ + continue; + } + } prevPtr = seg2Ptr; } } diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index d679d30..a41caa4 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -440,7 +440,9 @@ TkTextTagCmd( || (tagPtr->tabStringPtr != NULL) || (tagPtr->tabStyle == TK_TEXT_TABSTYLE_TABULAR) || (tagPtr->tabStyle == TK_TEXT_TABSTYLE_WORDPROCESSOR) - || (tagPtr->wrapMode != TEXT_WRAPMODE_NULL)) { + || (tagPtr->wrapMode == TEXT_WRAPMODE_CHAR) + || (tagPtr->wrapMode == TEXT_WRAPMODE_NONE) + || (tagPtr->wrapMode == TEXT_WRAPMODE_WORD)) { tagPtr->affectsDisplay = 1; tagPtr->affectsDisplayGeometry = 1; } |