diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-24 21:29:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-05-24 21:29:59 (GMT) |
commit | a8636d143def6ec81330e49af713edbb2e08862a (patch) | |
tree | ecbaea802a0bc17da9aaadc8f12c97d15e9c768d /generic/tkTextDisp.c | |
parent | 334a6b720c513b352e0b4d13dc50b498a78c2ee4 (diff) | |
download | tk-a8636d143def6ec81330e49af713edbb2e08862a.zip tk-a8636d143def6ec81330e49af713edbb2e08862a.tar.gz tk-a8636d143def6ec81330e49af713edbb2e08862a.tar.bz2 |
More progress
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index c75d98b..6917292 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -1214,7 +1214,7 @@ LayoutDLine( if (elide && indexPtr->byteIndex == 0) { maxBytes = 0; for (segPtr = info.segPtr; segPtr != NULL; segPtr = segPtr->nextPtr) { - if (segPtr->size > 0) { + if (segPtr->size + 1 > 1) { if (elide == 0) { /* * We toggled a tag and the elide state changed to @@ -1335,7 +1335,7 @@ LayoutDLine( connectNextLogicalLine: byteOffset = curIndex.byteIndex; segPtr = curIndex.linePtr->segPtr; - while ((byteOffset + 1 > 1) && (byteOffset >= (TkSizeT)segPtr->size)) { + while ((byteOffset + 1 > 1) && (byteOffset + 1 >= segPtr->size + 1)) { byteOffset -= segPtr->size; segPtr = segPtr->nextPtr; @@ -1375,7 +1375,7 @@ LayoutDLine( if (elide && (lastChunkPtr != NULL) && (lastChunkPtr->displayProc == NULL /*ElideDisplayProc*/)) { elidesize = segPtr->size - byteOffset; - if ((TkSizeT)segPtr->size > byteOffset) { + if (segPtr->size + 1 > byteOffset + 1) { curIndex.byteIndex += elidesize; lastChunkPtr->numBytes += elidesize; breakByteOffset = lastChunkPtr->breakIndex @@ -1621,7 +1621,7 @@ LayoutDLine( } curIndex.byteIndex += chunkPtr->numBytes; byteOffset += chunkPtr->numBytes; - if (byteOffset >= (TkSizeT)segPtr->size) { + if (byteOffset >= segPtr->size) { byteOffset = 0; segPtr = segPtr->nextPtr; if (elide && segPtr == NULL) { @@ -7822,7 +7822,7 @@ TkTextCharLayoutProc( } } checkForNextChunk: - if ((bytesThatFit + byteOffset) == (TkSizeT)segPtr->size) { + if ((bytesThatFit + byteOffset) == segPtr->size) { for (nextPtr = segPtr->nextPtr; nextPtr != NULL; nextPtr = nextPtr->nextPtr) { if (nextPtr->size != 0) { |