Re: Bugfix: Vim6.0n & Motif Scrollbars
- David Harrison wrote:
> This is just a cosmetic change, but it was driving me nuts. It has beenI see the problem. Since this is a Motif-specific problem, I would prefer to
> tested on IRIX Motif 1.2.3 and Linux Motif 2.1.30 and Linux Gtk. Everything
> seems more consistent now.
> In Motif (and ONLY Motif), the scrollbars were "gui.border_offset" pixels
> too far down.
> How to reproduce:
> Load up gvim.
> type ":set guioptions+=rl"
> Now, load in a file.
> Split the file into windows with "CTRL-W s" three or four times.
> Notice how the bottom of the scrollbar dips below the windows's status line.
> Proposed Solution:
> In Motif only, it seems that it is only necessary to subtract the
> border_offset from the y position of the scrollbars. No "special case"
> handling of the topmost scrollbar is really necessary.
> Here is a patch; maybe there is a cleaner way.. I don't have much time to
> tinker with this?:
solve in gui_motif.c. See the patch below.
Actually, it's strange that the border offset is added this way. But changing
this would require the need to change it for all GUI versions (and test it).
*** ../dist/vim60n/src/gui_motif.c Tue Nov 14 14:42:10 2000
--- gui_motif.c Wed Nov 29 21:23:47 2000
*** 991,1001 ****
--- 991,1007 ----
if (sb->id != (Widget)0)
if (sb->type == SBAR_LEFT || sb->type == SBAR_RIGHT)
+ if (y == 0)
+ h -= gui.border_offset;
+ y -= gui.border_offset;
XmNbottomOffset, -y - h,
GUARD #1: What, ridden on a horse?
GUARD #1: You're using coconuts!
GUARD #1: You've got two empty halves of coconut and you're bangin' 'em
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar Bram@... http://www.moolenaar.net \\\
\\\ Vim: http://www.vim.org ICCF Holland: http://iccf-holland.org ///