diff options
author | fvogel <fvogelnew1@free.fr> | 2015-07-14 19:50:15 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-07-14 19:50:15 (GMT) |
commit | 3a83abc685b4ac6238014a7064f3384f2282a202 (patch) | |
tree | bf277529ce9827cdc1c66eabc268c39e53981aea /generic/tkText.c | |
parent | def76faf990796ed8c158a61bd05d4b64ad17984 (diff) | |
download | tk-3a83abc685b4ac6238014a7064f3384f2282a202.zip tk-3a83abc685b4ac6238014a7064f3384f2282a202.tar.gz tk-3a83abc685b4ac6238014a7064f3384f2282a202.tar.bz2 |
Fixed bug [2886436fff] - [.txt delete] deletes before start index - This is option 1: change the behavior of the text widget to completely avoid any deletion before index1bug_2886436fff_option1
Diffstat (limited to 'generic/tkText.c')
-rw-r--r-- | generic/tkText.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/generic/tkText.c b/generic/tkText.c index 139e71d..f023509 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -2999,11 +2999,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. */ @@ -3018,10 +3016,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++) { |