diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index f2e760b..07623c4 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -4749,6 +4749,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 @@ -4765,11 +4768,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. */ |