summaryrefslogtreecommitdiffstats
path: root/generic/tkText.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-07-16 20:10:29 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-07-16 20:10:29 (GMT)
commit669cc3928e2e48f9ebb7accede7444184fa9d3bf (patch)
treeb45bd599479b6052ba807693fb4557ac967b0907 /generic/tkText.c
parent1ceae426adc5b03ca14c112531356d7d936865ec (diff)
parent9e9425e69824f6b7441eada0cfa96198bd0a1926 (diff)
downloadtk-669cc3928e2e48f9ebb7accede7444184fa9d3bf.zip
tk-669cc3928e2e48f9ebb7accede7444184fa9d3bf.tar.gz
tk-669cc3928e2e48f9ebb7accede7444184fa9d3bf.tar.bz2
Fixed bug [2886436fff] - [.txt] deletes before start index - by appyling the patch proposed in the ticket: no deletion will ever happen before the start index anymore
Diffstat (limited to 'generic/tkText.c')
-rw-r--r--generic/tkText.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index c0d0dc2..d93d8fc 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -3022,11 +3022,9 @@ DeleteIndexRange(
* The code below is ugly, but it's needed to make sure there is always a
* dummy empty line at the end of the text. If the final newline of the
* file (just before the dummy line) is being deleted, then back up index
- * to just before the newline. If there is a newline just before the first
- * character being deleted, then back up the first index too, so that an
- * even number of lines gets deleted. Furthermore, remove any tags that
- * are present on the newline that isn't going to be deleted after all
- * (this simulates deleting the newline and then adding a "clean" one back
+ * to just before the newline. Furthermore, remove any tags that are
+ * present on the newline that isn't going to be deleted after all (this
+ * simulates deleting the newline and then adding a "clean" one back
* again). Note that index1 and index2 might now be equal again which
* means that no text will be deleted but tags might be removed.
*/
@@ -3041,10 +3039,6 @@ DeleteIndexRange(
oldIndex2 = index2;
TkTextIndexBackChars(NULL, &oldIndex2, 1, &index2, COUNT_INDICES);
line2--;
- if ((index1.byteIndex == 0) && (line1 != 0)) {
- TkTextIndexBackChars(NULL, &index1, 1, &index1, COUNT_INDICES);
- line1--;
- }
arrayPtr = TkBTreeGetTags(&index2, NULL, &arraySize);
if (arrayPtr != NULL) {
for (i = 0; i < arraySize; i++) {