summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorfvogelnew1@free.fr <fvogel>2016-02-07 13:29:51 (GMT)
committerfvogelnew1@free.fr <fvogel>2016-02-07 13:29:51 (GMT)
commit3b24e8ecc9fd0571d85abca75b71befe18cb3244 (patch)
treeda7d2653cd43212b57ebc54297b81add18cd5542 /generic/tkTextDisp.c
parent6822910b57a9bb34079313d827e0828efaa19456 (diff)
downloadtk-3b24e8ecc9fd0571d85abca75b71befe18cb3244.zip
tk-3b24e8ecc9fd0571d85abca75b71befe18cb3244.tar.gz
tk-3b24e8ecc9fd0571d85abca75b71befe18cb3244.tar.bz2
Hopefully a better fix for [06c1433906] - Text widget crash
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.
*/