diff options
-rw-r--r-- | generic/tkTextDisp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index ef8d6f4..b832443 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -4803,9 +4803,15 @@ TextRedrawTag( /* * Round up the starting position if it's before the first line visible on - * the screen (we only care about what's on the screen). + * the screen (we only care about what's on the screen). Beware that the + * display info structure might need update, for instance if we arrived + * here after a delete operation triggering a trace running a tag removal + * covering the whole contents of the text widget. */ + if (dInfoPtr->flags & DINFO_OUT_OF_DATE) { + UpdateDisplayInfo(textPtr); + } dlPtr = dInfoPtr->dLinePtr; if (dlPtr == NULL) { return; |