Skip to content

Commit bd42b31

Browse files
committed
patch 8.1.1666: click in popup window scrollbar with border doesn't scroll
Problem: Click in popup window scrollbar with border doesn't scroll. Solution: Correct column for the border. (Naruhiko Nishino, closes #4650)
1 parent b420747 commit bd42b31

4 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/popupwin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ popup_handle_scrollbar_click(win_T *wp, int row, int col)
317317
return;
318318
if (row >= wp->w_popup_border[0]
319319
&& row < height - wp->w_popup_border[2]
320-
&& col == popup_width(wp) - 1)
320+
&& col == popup_width(wp) - wp->w_popup_border[1] - 1)
321321
{
322322
if (row >= height / 2)
323323
{
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
>1+0&#ffffff0| @73
22
|2| @73
3-
|3| @73
4-
|4| @31|f+0#0000001#ffd7ff255|i|v|e| @3| +0#0000000#ff404010| +0&#ffffff0@32
5-
|5| @31|s+0#0000001#ffd7ff255|i|x| @4| +0#0000000#ff404010| +0&#ffffff0@32
6-
|6| @31|s+0#0000001#ffd7ff255|e|v|e|n| @2| +0#0000000#4040ff13| +0&#ffffff0@32
7-
|7| @31|e+0#0000001#ffd7ff255|i|g|h|t| @2| +0#0000000#4040ff13| +0&#ffffff0@32
8-
|8| @73
3+
|3| @30|╔+0#0000001#ffd7ff255|═@8|X| +0#0000000#ffffff0@31
4+
|4| @30|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
5+
|5| @30|║+0#0000001#ffd7ff255|s|i|x| @4| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
6+
|6| @30|║+0#0000001#ffd7ff255|s|e|v|e|n| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
7+
|7| @30|║+0#0000001#ffd7ff255|e|i|g|h|t| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
8+
|8| @30|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@31
99
|9| @73
1010
|:|c|a|l@1| |C|l|i|c|k|B|o|t|(|)| @40|1|,|1| @10|T|o|p|

src/testdir/test_popupwin.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,7 @@ func Test_popup_scrollbar()
15801580
call feedkeys("\<F4>\<LeftMouse>", "xt")
15811581
endfunc
15821582
func ClickBot()
1583+
call popup_setoptions(g:winid, {'border': [], 'close': 'button'})
15831584
call feedkeys("\<F5>\<LeftMouse>", "xt")
15841585
endfunc
15851586
map <silent> <F3> :call test_setmouse(5, 36)<CR>

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1666,
780782
/**/
781783
1665,
782784
/**/

0 commit comments

Comments
 (0)