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 -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220207155830.9BFC91C071D%40moolenaar.net.

Raspunde prin e-mail lui