summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-04-13 20:35:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-04-13 20:35:50 (GMT)
commitcadd5e537130fda5fd041a48f72d402b7227f853 (patch)
tree8aa952ebc56cb24073bd0bb783de84a1922b6481 /generic
parent479d9861673212fae0bba018becfa2c08124e026 (diff)
downloadtk-cadd5e537130fda5fd041a48f72d402b7227f853.zip
tk-cadd5e537130fda5fd041a48f72d402b7227f853.tar.gz
tk-cadd5e537130fda5fd041a48f72d402b7227f853.tar.bz2
Remove code that became useless since previous commit because TkTextSetYView() now adjusts the index to the -startline/-endline range.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index c41fc67..d1032e5 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -3284,14 +3284,6 @@ DeleteIndexRange(
if (tPtr == textPtr) {
if (viewUpdate) {
- /*
- * line cannot be before -startline of textPtr because
- * this line corresponds to an index which is necessarily
- * between "1.0" and "end" relative to textPtr.
- * Therefore no need to clamp line to the -start/-end
- * range.
- */
-
TkTextMakeByteIndex(sharedTextPtr->tree, textPtr, line,
byteIndex, &indexTmp);
TkTextSetYView(tPtr, &indexTmp, 0);
@@ -3299,27 +3291,6 @@ DeleteIndexRange(
} else {
TkTextMakeByteIndex(sharedTextPtr->tree, tPtr, line,
byteIndex, &indexTmp);
- /*
- * line may be before -startline of tPtr and must be
- * clamped to -startline before providing it to
- * TkTextSetYView otherwise lines before -startline
- * would be displayed.
- * There is no need to worry about -endline however,
- * because the view will only be reset if the deletion
- * involves the TOP line of the screen
- */
-
- if (tPtr->start != NULL) {
- int start;
- TkTextIndex indexStart;
-
- start = TkBTreeLinesTo(NULL, tPtr->start);
- TkTextMakeByteIndex(sharedTextPtr->tree, NULL, start,
- 0, &indexStart);
- if (TkTextIndexCmp(&indexTmp, &indexStart) < 0) {
- indexTmp = indexStart;
- }
- }
TkTextSetYView(tPtr, &indexTmp, 0);
}
}