[vim/vim] Motif: Fix scrollbar width after a :vsplit (PR #11946)

6 views
Skip to first unread message

qsmodo

unread,
Feb 4, 2023, 1:18:51 PM2/4/23
to vim/vim, Subscribed

The bug is observable if splitright is on and a non-default -scrollbarwidth is passed:

./vim --clean -g -sw 5 +'se splitright' +vs

Without the fix, the right window scrollbar is much more than 5px wide, although it would change into the correct 5px width once you interact with the window.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/11946

Commit Summary

  • 7dd47dd Motif: Fix scrollbar width after a :vsplit

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946@github.com>

codecov[bot]

unread,
Feb 4, 2023, 1:29:54 PM2/4/23
to vim/vim, Subscribed

Codecov Report

Merging #11946 (7dd47dd) into master (4be18e7) will decrease coverage by 0.82%.
The diff coverage is n/a.

@@            Coverage Diff             @@

##           master   #11946      +/-   ##

==========================================

- Coverage   81.88%   81.06%   -0.82%     

==========================================

  Files         164      154      -10     

  Lines      193673   183242   -10431     

  Branches    43787    41363    -2424     

==========================================

- Hits       158582   148545   -10037     

+ Misses      22252    21736     -516     

- Partials    12839    12961     +122     
Flag Coverage Δ
huge-clang-none 82.60% <ø> (-0.02%) ⬇️
huge-gcc-testgui ?
huge-gcc-unittests 0.29% <ø> (-0.01%) ⬇️
linux 81.06% <ø> (-1.21%) ⬇️
mingw-x64-HUGE ?
mingw-x86-HUGE ?
windows ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/if_perl.xs 54.50% <0.00%> (-17.82%) ⬇️
src/regexp_nfa.c 80.52% <0.00%> (-9.18%) ⬇️
src/arabic.c 85.86% <0.00%> (-8.70%) ⬇️
src/typval.c 82.00% <0.00%> (-7.99%) ⬇️
src/regexp_bt.c 78.52% <0.00%> (-7.46%) ⬇️
src/gui_beval.c 45.27% <0.00%> (-7.09%) ⬇️
src/vim9execute.c 82.32% <0.00%> (-6.96%) ⬇️
src/json.c 77.84% <0.00%> (-5.47%) ⬇️
src/vim9instr.c 76.94% <0.00%> (-4.96%) ⬇️
src/vim9compile.c 86.70% <0.00%> (-4.54%) ⬇️
... and 137 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/c1416819936@github.com>

qsmodo

unread,
Feb 5, 2023, 7:20:42 AM2/5/23
to vim/vim, Push

@qsmodo pushed 1 commit.

  • fd12101 Motif: Fix scrollbar width after a :vsplit


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/push/12514288135@github.com>

Bram Moolenaar

unread,
Feb 7, 2023, 2:39:35 PM2/7/23
to vim/vim, Subscribed


> The bug is observable if splitright is on and a non-default
> -scrollbarwidth is passed:
>
> ./vim --clean -g -sw 5 +'se splitright' +vs
>
> Without the fix, the right window scrollbar is much more than 5px
> wide, although it would change into the correct 5px width once you
> interact with the window.

I cannot reproduce the problem. The width of 5 does not result in a
usable scrollbar, the thumb is not visible. I also tried a value of 10.

Why would it require to add an argument for the width when using a
vertical scrollbar, but not the height when using a horizontal
scrollbar? Did you not try this, or is the Motif library asymmetric?

--
Common sense is what tells you that the world is flat.

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/c1421342290@github.com>

qsmodo

unread,
Feb 8, 2023, 8:28:46 AM2/8/23
to vim/vim, Push

@qsmodo pushed 2 commits.

  • 82d1ca8 Motif: Fix scrollbar width after splitting.
  • f1d572f Motif: -scrollbarwidth should affect horizontal bar height.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/push/12551430569@github.com>

qsmodo

unread,
Feb 8, 2023, 8:30:38 AM2/8/23
to vim/vim, Subscribed

I cannot reproduce the problem. The width of 5 does not result in a
usable scrollbar, the thumb is not visible. I also tried a value of 10.

I now realize it's only reproducible when the Gvim window is full screen. Can you reproduce it under that circumstance?

Yes a value of 10 is fine to reproduce it, even a big value like 50.

Why would it require to add an argument for the width when using a
vertical scrollbar, but not the height when using a horizontal
scrollbar? Did you not try this, or is the Motif library asymmetric?

I hadn't tested it. Yes the horizontal scrollbar needs its fix too, I just added that. The Motif library is asymetric so that will be XmNheight for horizontal scrollbar.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/c1422603601@github.com>

Bram Moolenaar

unread,
Feb 11, 2023, 2:12:33 PM2/11/23
to vim/vim, Subscribed


> > I cannot reproduce the problem. The width of 5 does not result in a
> > usable scrollbar, the thumb is not visible. I also tried a value of 10.
>
> I now realize it's only reproducible when the Gvim window is full
> screen. Can you reproduce it under that circumstance?

Yes, when the window is maximized I can reproduce.


> Yes a value of 10 is fine to reproduce it, even a big value like 50.
>
> > Why would it require to add an argument for the width when using a
> > vertical scrollbar, but not the height when using a horizontal
> > scrollbar? Did you not try this, or is the Motif library asymmetric?
>
> I hadn't tested it. Yes the horizontal scrollbar needs its fix too, I
> just added that. The Motif library is asymetric so that will be
> XmNheight for horizontal scrollbar.

OK, but then also use gui.scrollbar_height for the value.

This would only be needed when the window is maximized, but I suppose it
doesn't hurt to always do this.

--
Amnesia is one of my favorite words, but I forgot what it means.


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/c1426856542@github.com>

Bram Moolenaar

unread,
Feb 11, 2023, 2:13:41 PM2/11/23
to vim/vim, Subscribed

Closed #11946 via 094b847.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/11946/issue_event/8497182288@github.com>

Reply all
Reply to author
Forward
0 new messages