summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-04-17 13:11:42 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-04-17 13:11:42 (GMT)
commitbbe6a7d31d30a7e5da059feb23f94f1412dbf307 (patch)
tree84bca49f6bf5e9978f573c5bf74777ec49344c18 /generic
parent4746d38d07091977274df1faa0b6f3a06fdb7118 (diff)
downloadtk-bbe6a7d31d30a7e5da059feb23f94f1412dbf307.zip
tk-bbe6a7d31d30a7e5da059feb23f94f1412dbf307.tar.gz
tk-bbe6a7d31d30a7e5da059feb23f94f1412dbf307.tar.bz2
Fix old commit [5528cb094a]. This commit changed NULL into tPtr in the call to TkTextMakeByteIndex() and introduced a check against -startline. However from then on this check is always false since the index returned by TkTextMakeByteIndex() is relative to tPtr and can never be located before the -startline of this peer. The error in [5528cb094a] was to replace NULL by tPtr. The line in this call is relative to textPtr, not to a peer tPtr, and NULL must be kept (and then the check against -startline is useful and runs in several tests of the test suite).
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index c41fc67..d2a1691 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -3297,7 +3297,7 @@ DeleteIndexRange(
TkTextSetYView(tPtr, &indexTmp, 0);
}
} else {
- TkTextMakeByteIndex(sharedTextPtr->tree, tPtr, line,
+ TkTextMakeByteIndex(sharedTextPtr->tree, NULL, line,
byteIndex, &indexTmp);
/*
* line may be before -startline of tPtr and must be