summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogel <fvogel@noemail.net>2016-02-07 13:29:51 (GMT)
committerfvogel <fvogel@noemail.net>2016-02-07 13:29:51 (GMT)
commit277aa143447b76c2136c06a709e2467fce0e6553 (patch)
treeda7d2653cd43212b57ebc54297b81add18cd5542 /generic/tkTextDisp.c
parentf9f47f2598b932a72be8df727222595ebec7301f (diff)
downloadtk-277aa143447b76c2136c06a709e2467fce0e6553.zip
tk-277aa143447b76c2136c06a709e2467fce0e6553.tar.gz
tk-277aa143447b76c2136c06a709e2467fce0e6553.tar.bz2
Hopefully a better fix for [06c1433906] - Text widget crash
FossilOrigin-Name: c3c09f825187eb33c3ea0e3ea498e682e7400f01
Diffstat (limited to 'generic/tkTextDisp.c')
-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.
*/