From 80adb8d2b8c0fcf8a754e324f9234e1aa5db0853 Mon Sep 17 00:00:00 2001 From: fvogel Date: Tue, 30 Dec 2014 16:38:53 +0000 Subject: Fixed comments in TextChanged --- generic/tkTextDisp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 56d1003..6d49488 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -4669,11 +4669,10 @@ TextChanged( firstPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded); if (firstPtr == NULL) { - /* * index1Ptr pertains to no display line, i.e this index is after * the last display line. Since index2Ptr is after index1Ptr, there - * are no display line to free/redisplay and we can return early. + * is no display line to free/redisplay and we can return early. */ return; @@ -4698,8 +4697,8 @@ TextChanged( /* * 'rounded' now points to the start of a display line as well as the - * real (non elided) start of a logical line, and this index is the - * closest after index2Ptr. + * start of a logical line not merged with its previous line, and + * this index is the closest after index2Ptr. */ lastPtr = FindDLine(textPtr, dInfoPtr->dLinePtr, &rounded); @@ -4713,6 +4712,7 @@ TextChanged( * Note that lastPtr != NULL here, otherwise we would have returned * earlier when we tested for firstPtr being NULL. */ + if (lastPtr == firstPtr) { lastPtr = lastPtr->nextPtr; } -- cgit v0.12