diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index 510f3e0..d773fff 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -6435,6 +6435,7 @@ FindDLine( CONST TkTextIndex *indexPtr)/* Index of desired character. */ { TkTextLine *linePtr; + DLine *dlPtrPrev; if (dlPtr == NULL) { return NULL; @@ -6455,6 +6456,7 @@ FindDLine( linePtr = dlPtr->index.linePtr; while (linePtr != indexPtr->linePtr) { while (dlPtr->index.linePtr == linePtr) { + dlPtrPrev = dlPtr; dlPtr = dlPtr->nextPtr; if (dlPtr == NULL) { return NULL; @@ -6472,7 +6474,7 @@ FindDLine( } } if (indexPtr->linePtr != dlPtr->index.linePtr) { - return dlPtr; + return dlPtrPrev; } /* |