diff options
author | fvogel <fvogelnew1@free.fr> | 2015-12-12 17:35:27 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-12-12 17:35:27 (GMT) |
commit | 92c4176bdae17dbc3ab1d73817e155043caeb781 (patch) | |
tree | 8a3d5eba40003d615f22dcb49cc6d03a5d67d5ba /generic/tkTextDisp.c | |
parent | fbcd240c74caa743dc1fef3f144cd2154895befc (diff) | |
parent | 98378541b701acb3b2821a3b9f1e0a23fb57bcfc (diff) | |
download | tk-92c4176bdae17dbc3ab1d73817e155043caeb781.zip tk-92c4176bdae17dbc3ab1d73817e155043caeb781.tar.gz tk-92c4176bdae17dbc3ab1d73817e155043caeb781.tar.bz2 |
Fix for bug [1739605] - [text see] misbehaves following widget create/populate - Patch from Koen Danckaert
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r-- | generic/tkTextDisp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c index cfe6e7a..851e17a 100644 --- a/generic/tkTextDisp.c +++ b/generic/tkTextDisp.c @@ -5237,6 +5237,15 @@ TkTextSetYView( } /* + * If the window height is smaller than the line height, prefer to make + * the top of the line visible. + */ + + if (dInfoPtr->maxY - dInfoPtr->y < lineHeight) { + bottomY = lineHeight; + } + + /* * Our job now is to arrange the display so that indexPtr appears as low * on the screen as possible but with its bottom no lower than bottomY. * BottomY is the bottom of the window if the desired line is just below |