summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2016-02-07 13:29:51 (GMT)
committerfvogel <fvogelnew1@free.fr>2016-02-07 13:29:51 (GMT)
commite5ea273dc4f32113d02d0ede8742e214ad6ea37b (patch)
treeda7d2653cd43212b57ebc54297b81add18cd5542
parent6dddb4fc012c00ae1c5465fcf5225fa618a6994c (diff)
downloadtk-e5ea273dc4f32113d02d0ede8742e214ad6ea37b.zip
tk-e5ea273dc4f32113d02d0ede8742e214ad6ea37b.tar.gz
tk-e5ea273dc4f32113d02d0ede8742e214ad6ea37b.tar.bz2
Hopefully a better fix for [06c1433906] - Text widget crash
-rw-r--r--generic/tkTextDisp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 10f6414..fe69f28 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -4683,6 +4683,9 @@ TextChanged(
*/
lastPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded);
+ if ((lastPtr != NULL) && (TkTextIndexCmp(&lastPtr->index, &rounded) < 0)) {
+ lastPtr = lastPtr->nextPtr;
+ }
/*
* At least one display line is supposed to change. This makes the
@@ -4699,11 +4702,6 @@ TextChanged(
}
}
- while ((lastPtr != NULL)
- && (lastPtr->index.linePtr == index2Ptr->linePtr)) {
- lastPtr = lastPtr->nextPtr;
- }
-
/*
* Delete all the DLines from firstPtr up to but not including lastPtr.
*/