summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2015-12-05 13:48:24 (GMT)
committerfvogel <fvogelnew1@free.fr>2015-12-05 13:48:24 (GMT)
commit1c20b0f7e0b8d0e66ff9b4325dbc2859968f52fd (patch)
tree5044ed6a605c398058fb168876c47da55fb97737 /generic
parent7f2c3a3f39d6a76f0656cbffc7e589b1a59bc346 (diff)
downloadtk-1c20b0f7e0b8d0e66ff9b4325dbc2859968f52fd.zip
tk-1c20b0f7e0b8d0e66ff9b4325dbc2859968f52fd.tar.gz
tk-1c20b0f7e0b8d0e66ff9b4325dbc2859968f52fd.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 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