Patch 8.2.5042

5 views
Skip to first unread message

Bram Moolenaar

unread,
May 30, 2022, 8:21:42 AM5/30/22
to vim...@googlegroups.com

Patch 8.2.5042
Problem: Scrollbar thumb in tall scrolled popup not visible.
Solution: Show at least one thumb character. (fixes 10492)
Files: src/popupwin.c, src/testdir/test_popupwin.vim,
src/testdir/dumps/Test_popupwin_scroll_13.dump


*** ../vim-8.2.5041/src/popupwin.c 2022-05-29 18:17:57.130366124 +0100
--- src/popupwin.c 2022-05-30 13:19:24.372963491 +0100
***************
*** 4108,4114 ****
last = total_height - top_off - wp->w_popup_border[2];
if (sb_thumb_top >= last)
// show at least one character
! sb_thumb_top = last;

if (wp->w_scrollbar_highlight != NULL)
attr_scroll = syn_name2attr(wp->w_scrollbar_highlight);
--- 4110,4116 ----
last = total_height - top_off - wp->w_popup_border[2];
if (sb_thumb_top >= last)
// show at least one character
! sb_thumb_top = last - 1;

if (wp->w_scrollbar_highlight != NULL)
attr_scroll = syn_name2attr(wp->w_scrollbar_highlight);
*** ../vim-8.2.5041/src/testdir/test_popupwin.vim 2022-05-29 22:37:00.304418468 +0100
--- src/testdir/test_popupwin.vim 2022-05-30 13:18:04.469087716 +0100
***************
*** 2344,2351 ****
endfunc
func ScrollBottom()
call popup_clear()
! let id = CreatePopup(range(20)->map({k, v -> string(v)}))
! call popup_setoptions(id, #{firstline: 20})
endfunc
map <silent> <F3> :call test_setmouse(5, 36)<CR>
map <silent> <F4> :call test_setmouse(4, 42)<CR>
--- 2344,2351 ----
endfunc
func ScrollBottom()
call popup_clear()
! let id = CreatePopup(range(100)->map({k, v -> string(v)}))
! call popup_setoptions(id, #{firstline: 100, minheight: 9, maxheight: 9})
endfunc
map <silent> <F3> :call test_setmouse(5, 36)<CR>
map <silent> <F4> :call test_setmouse(4, 42)<CR>
*** ../vim-8.2.5041/src/testdir/dumps/Test_popupwin_scroll_13.dump 2022-05-29 18:17:57.130366124 +0100
--- src/testdir/dumps/Test_popupwin_scroll_13.dump 2022-05-30 13:18:42.757028179 +0100
***************
*** 1,10 ****
! >1+0&#ffffff0| @73
! |2| @73
! |3| @73
! |4| @20|1+0#0000001#ffd7ff255|9| @27| +0#0000000#a8a8a8255| +0&#ffffff0@21
|5| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
|6| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |7| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#0000001| +0&#ffffff0@21
! |8| @73
! |9| @73
|:|c|a|l@1| |S|c|r|o|l@1|B|o|t@1|o|m|(|)| @36|1|,|1| @10|T|o|p|
--- 1,10 ----
! >1+0&#ffffff0| @20|9+0#0000001#ffd7ff255@1| @27| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |2| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |3| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |4| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
|5| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
|6| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |7| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |8| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#a8a8a8255| +0&#ffffff0@21
! |9| @20| +0#4040ff13#ffd7ff255@29| +0#0000000#0000001| +0&#ffffff0@21
|:|c|a|l@1| |S|c|r|o|l@1|B|o|t@1|o|m|(|)| @36|1|,|1| @10|T|o|p|
*** ../vim-8.2.5041/src/version.c 2022-05-29 22:37:00.304418468 +0100
--- src/version.c 2022-05-30 13:12:27.341624422 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5042,
/**/

--
ARTHUR: Will you ask your master if he wants to join my court at Camelot?!
GUARD #1: But then of course African swallows are not migratory.
GUARD #2: Oh, yeah...
GUARD #1: So they couldn't bring a coconut back anyway...
The Quest for the Holy Grail (Monty Python)

/// 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