diff options
author | fvogel <fvogelnew1@free.fr> | 2021-04-17 13:11:42 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2021-04-17 13:11:42 (GMT) |
commit | bbe6a7d31d30a7e5da059feb23f94f1412dbf307 (patch) | |
tree | 84bca49f6bf5e9978f573c5bf74777ec49344c18 /generic | |
parent | 4746d38d07091977274df1faa0b6f3a06fdb7118 (diff) | |
download | tk-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.c | 2 |
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 |