summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-12-12 17:44:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-12-12 17:44:50 (GMT)
commit72dde23165afa96dcc2cc50263394cefafe8e403 (patch)
treef1e1a4b536a4fa225d18dfe708718cb67764c192 /generic
parent2f891a9b652694baa3de7783650137a17f0d9f98 (diff)
parent92c4176bdae17dbc3ab1d73817e155043caeb781 (diff)
downloadtk-72dde23165afa96dcc2cc50263394cefafe8e403.zip
tk-72dde23165afa96dcc2cc50263394cefafe8e403.tar.gz
tk-72dde23165afa96dcc2cc50263394cefafe8e403.tar.bz2
Fix for bug [1739605] - [text see] misbehaves following widget create/populate - Patch from Koen Danckaert
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 74620fc..86a81c0 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -5239,6 +5239,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