summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-03-27 15:02:41 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-03-27 15:02:41 (GMT)
commit27c210cc9a79fc426bd62757e1410f797012f3e0 (patch)
tree7d706f6c1eeada6dca99711a031e0d88e9d2dcf6 /generic
parent04ed959780456503f83b4aa4e4d67c344ad9ded4 (diff)
parentb3db9087841c153570ebfc1edd7ac33f3dd8bbcf (diff)
downloadtk-27c210cc9a79fc426bd62757e1410f797012f3e0.zip
tk-27c210cc9a79fc426bd62757e1410f797012f3e0.tar.gz
tk-27c210cc9a79fc426bd62757e1410f797012f3e0.tar.bz2
End of fix for [18c08df753] - Merged branch bug-2886436fff-option2bug_18c08df753
Diffstat (limited to 'generic')
-rw-r--r--generic/tkText.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/generic/tkText.c b/generic/tkText.c
index 4942913..8edf82d 100644
--- a/generic/tkText.c
+++ b/generic/tkText.c
@@ -3004,12 +3004,15 @@ DeleteIndexRange(
* 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
- * again). Note that index1 and index2 might now be equal again which
- * means that no text will be deleted but tags might be removed.
+ * character being deleted, then back up the first index too. The idea is
+ * that a deletion involving a range starting at a line start and
+ * including the final \n (i.e. index2 is "end") is an attempt to delete
+ * complete lines, so the \n before the deleted block shall become the new
+ * final \n. 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.
*/
line1 = TkBTreeLinesTo(textPtr, index1.linePtr);