Patch 8.2.4320

6 views
Skip to first unread message

Bram Moolenaar

unread,
Feb 7, 2022, 10:58:36 AM2/7/22
to vim...@googlegroups.com

Patch 8.2.4320
Problem: Athena and Motif: when maximized scrollbar position is wrong.
Solution: Implement the scrollbar padding functions. (closes #9712)
Files: src/gui_athena.c, src/gui_motif.c


*** ../vim-8.2.4319/src/gui_athena.c 2022-01-06 12:35:27.984532089 +0000
--- src/gui_athena.c 2022-02-07 15:46:06.720325730 +0000
***************
*** 1894,1910 ****
int
gui_mch_get_scrollbar_xpadding(void)
{
! // TODO: Calculate the padding for adjust scrollbar position when the
! // Window is maximized.
! return 0;
}

int
gui_mch_get_scrollbar_ypadding(void)
{
! // TODO: Calculate the padding for adjust scrollbar position when the
! // Window is maximized.
! return 0;
}

void
--- 1894,1920 ----
int
gui_mch_get_scrollbar_xpadding(void)
{
! 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)
{
! 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
*** ../vim-8.2.4319/src/gui_motif.c 2022-01-31 14:59:33.518943700 +0000
--- src/gui_motif.c 2022-02-07 15:46:06.720325730 +0000
***************
*** 1745,1761 ****
int
gui_mch_get_scrollbar_xpadding(void)
{
! // TODO: Calculate the padding for adjust scrollbar position when the
! // Window is maximized.
! return 0;
}

int
gui_mch_get_scrollbar_ypadding(void)
{
! // TODO: Calculate the padding for adjust scrollbar position when the
! // Window is maximized.
! return 0;
}

void
--- 1745,1771 ----
int
gui_mch_get_scrollbar_xpadding(void)
{
! 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)
{
! 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
*** ../vim-8.2.4319/src/version.c 2022-02-07 15:31:33.081531879 +0000
--- src/version.c 2022-02-07 15:57:25.739412779 +0000
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4320,
/**/

--
hundred-and-one symptoms of being an internet addict:
23. You can't call your mother... she doesn't have VOIP

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages