summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-08 21:09:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-02-08 21:09:28 (GMT)
commit18ed80a2c23c58a02ac1fa4d2e2542f37a8f2fa7 (patch)
treebbed7a960cd1727844578c183b494c4fad51705e /generic
parent43fd6231753851e578bffc9ad6df133117802a36 (diff)
parent1ade324bf42e515369a1d1f123cbb03f31ef5ba2 (diff)
downloadtk-18ed80a2c23c58a02ac1fa4d2e2542f37a8f2fa7.zip
tk-18ed80a2c23c58a02ac1fa4d2e2542f37a8f2fa7.tar.gz
tk-18ed80a2c23c58a02ac1fa4d2e2542f37a8f2fa7.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextIndex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index 1a3cebd..31a95a7 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -2454,6 +2454,9 @@ StartEnd(
firstChar = 0;
}
if (offset == 0) {
+ if (indexPtr->byteIndex == 0) {
+ goto done;
+ }
if (modifier == TKINDEX_DISPLAY) {
TkTextIndexBackChars(textPtr, indexPtr, 1, indexPtr,
COUNT_DISPLAY_INDICES);
@@ -2466,9 +2469,6 @@ StartEnd(
}
offset -= chSize;
if (offset < 0) {
- if (indexPtr->byteIndex == 0) {
- goto done;
- }
segPtr = TkTextIndexToSeg(indexPtr, &offset);
}
}