diff options
author | fvogelnew1@free.fr <fvogel> | 2012-05-17 14:30:38 (GMT) |
---|---|---|
committer | fvogelnew1@free.fr <fvogel> | 2012-05-17 14:30:38 (GMT) |
commit | d23189ee2d76024b9c9c5a561b0da4eb0f58e7c1 (patch) | |
tree | 7bc1ad7d29414f00126f3f2adeadc7cc81183a81 /generic | |
parent | f54cc82fe6038bc83bbb6c573a811a23be543b83 (diff) | |
download | tk-d23189ee2d76024b9c9c5a561b0da4eb0f58e7c1.zip tk-d23189ee2d76024b9c9c5a561b0da4eb0f58e7c1.tar.gz tk-d23189ee2d76024b9c9c5a561b0da4eb0f58e7c1.tar.bz2 |
[Bug 1630254]: missing scrolling of text widget when from a -startline == -endline initial state it is configured to display a non-empty part of it
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkTextDisp.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index d0cd4d2..13695e8 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -2005,8 +2005,21 @@ UpdateDisplayInfo( * widget. */ - lineNum = -1; - bytesToCount = 0; /* Stop compiler warning. */ + if (textPtr->start == textPtr->end) { + /* + * Empty peer widget. + */ + lineNum = -1; + bytesToCount = 0; /* Stop compiler warning. */ + } else { + /* + * Widget that was empty, but no longer is. + * (Bug 1630254) + */ + lineNum = TkBTreeNumLines(textPtr->sharedTextPtr->tree, + textPtr) - 1; + bytesToCount = INT_MAX; + } } else { lineNum = TkBTreeLinesTo(textPtr, dInfoPtr->dLinePtr->index.linePtr); |