summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui_athena.c22
-rw-r--r--src/gui_motif.c22
-rw-r--r--src/version.c2
3 files changed, 34 insertions, 12 deletions
diff --git a/src/gui_athena.c b/src/gui_athena.c
index db13bd34f7..6cbabf81d2 100644
--- a/src/gui_athena.c
+++ b/src/gui_athena.c
@@ -1894,17 +1894,27 @@ gui_mch_set_scrollbar_pos(
int
gui_mch_get_scrollbar_xpadding(void)
{
- // TODO: Calculate the padding for adjust scrollbar position when the
- // Window is maximized.
- return 0;
+ int xpad;
+ Dimension tw, ww;
+ Position tx;
+
+ XtVaGetValues(textArea, XtNwidth, &tw, XtNx, &tx, NULL);
+ XtVaGetValues(vimShell, XtNwidth, &ww, NULL);
+ xpad = ww - tw - tx - gui.scrollbar_width;
+ return (xpad < 0) ? 0 : xpad;
}
int
gui_mch_get_scrollbar_ypadding(void)
{
- // TODO: Calculate the padding for adjust scrollbar position when the
- // Window is maximized.
- return 0;
+ int ypad;
+ Dimension th, wh;
+ Position ty;
+
+ XtVaGetValues(textArea, XtNheight, &th, XtNy, &ty, NULL);
+ XtVaGetValues(vimShell, XtNheight, &wh, NULL);
+ ypad = wh - th - ty - gui.scrollbar_height;
+ return (ypad < 0) ? 0 : ypad;
}
void
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 8328045bab..ef3747d8d2 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -1745,17 +1745,27 @@ gui_mch_set_scrollbar_pos(
int
gui_mch_get_scrollbar_xpadding(void)
{
- // TODO: Calculate the padding for adjust scrollbar position when the
- // Window is maximized.
- return 0;
+ int xpad;
+ Dimension tw, ww;
+ Position tx;
+
+ XtVaGetValues(textArea, XtNwidth, &tw, XtNx, &tx, NULL);
+ XtVaGetValues(vimShell, XtNwidth, &ww, NULL);
+ xpad = ww - tw - tx - gui.scrollbar_width;
+ return (xpad < 0) ? 0 : xpad;
}
int
gui_mch_get_scrollbar_ypadding(void)
{
- // TODO: Calculate the padding for adjust scrollbar position when the
- // Window is maximized.
- return 0;
+ int ypad;
+ Dimension th, wh;
+ Position ty;
+
+ XtVaGetValues(textArea, XtNheight, &th, XtNy, &ty, NULL);
+ XtVaGetValues(vimShell, XtNheight, &wh, NULL);
+ ypad = wh - th - ty - gui.scrollbar_height;
+ return (ypad < 0) ? 0 : ypad;
}
void
diff --git a/src/version.c b/src/version.c
index 3535adbeef..4fdeb2fdeb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4320,
+/**/
4319,
/**/
4318,