Import Tk 8.6.12

This commit is contained in:
Steve Dower
2021-11-08 17:28:57 +00:00
parent 070b8750b0
commit c6710de848
290 changed files with 5626 additions and 3660 deletions

View File

@@ -1727,6 +1727,26 @@ TkBTreeFindPixelLine(
}
pixels -= linePtr->pixels[2 * pixelReference];
}
/*
* Check for any start/end offset for this text widget.
*/
if (textPtr->start != NULL) {
int lineBoundary = TkBTreeLinesTo(NULL, textPtr->start);
if (TkBTreeLinesTo(NULL, linePtr) < lineBoundary) {
linePtr = TkBTreeFindLine(tree, NULL, lineBoundary);
}
}
if (textPtr->end != NULL) {
int lineBoundary = TkBTreeLinesTo(NULL, textPtr->end);
if (TkBTreeLinesTo(NULL, linePtr) > lineBoundary) {
linePtr = TkBTreeFindLine(tree, NULL, lineBoundary);
}
}
if (pixelOffset != NULL && linePtr != NULL) {
*pixelOffset = pixels;
}