summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2016-02-08 19:17:01 (GMT)
committerdgp@users.sourceforge.net <dgp>2016-02-08 19:17:01 (GMT)
commit82aeb734f92843c5514fab1681d7570ce0a36cfc (patch)
tree725cb54e8145c728a3cdd55719f56cff241245d5
parentb293876fcf0c6a35bcdb7d8711ba0dc85e211532 (diff)
parent7bc6ee68f558e550d5909773d2da9c2734fe1610 (diff)
downloadtk-82aeb734f92843c5514fab1681d7570ce0a36cfc.zip
tk-82aeb734f92843c5514fab1681d7570ce0a36cfc.tar.gz
tk-82aeb734f92843c5514fab1681d7570ce0a36cfc.tar.bz2
merge 8.5
-rw-r--r--generic/tkTextDisp.c3
-rw-r--r--tests/textDisp.test8
2 files changed, 11 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 133a7d7..91642f9 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -4683,6 +4683,9 @@ TextChanged(
*/
lastPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded);
+ while ((lastPtr != NULL) && (TkTextIndexCmp(&lastPtr->index, &rounded) < 0)) {
+ lastPtr = lastPtr->nextPtr;
+ }
/*
* At least one display line is supposed to change. This makes the
diff --git a/tests/textDisp.test b/tests/textDisp.test
index ac3aee0..532caf4 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -1191,6 +1191,14 @@ test textDisp-8.12 {TkTextChanged, moving the insert cursor redraws only past an
# because during (b) findDLine cannot return the display line the
# cursor is in since this display line was just unlinked in (a).
} {{8.0 9.0} {8.0 12.0} {8.0 12.0} {3.0 8.0} {2.0 3.0}}
+test textDisp-8.13 {TkTextChanged, used to crash, see [06c1433906]} {
+ .t delete 1.0 end
+ .t insert 1.0 \nLine1\nLine2\n
+ update
+ .t insert 3.0 ""
+ .t delete 1.0 2.0
+ update idletasks
+} {}
test textDisp-9.1 {TkTextRedrawTag} {
.t configure -wrap char