diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-12 16:35:34 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-12 16:35:34 +0200 |
commit | bd42b31780794fa751597cf3aa4d1d01889b1494 (patch) | |
tree | 2263fcb0f0396a6bccf1d79b78150c2d111d0a64 /src | |
parent | b4207474780569bcc9840e03f13edb5d9c2554f5 (diff) | |
download | vim-git-bd42b31780794fa751597cf3aa4d1d01889b1494.tar.gz |
patch 8.1.1666: click in popup window scrollbar with border doesn't scrollv8.1.1666
Problem: Click in popup window scrollbar with border doesn't scroll.
Solution: Correct column for the border. (Naruhiko Nishino, closes #4650)
Diffstat (limited to 'src')
-rw-r--r-- | src/popupwin.c | 2 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_scroll_9.dump | 12 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 968f6eeda..aa19a5d63 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -317,7 +317,7 @@ popup_handle_scrollbar_click(win_T *wp, int row, int col) return; if (row >= wp->w_popup_border[0] && row < height - wp->w_popup_border[2] - && col == popup_width(wp) - 1) + && col == popup_width(wp) - wp->w_popup_border[1] - 1) { if (row >= height / 2) { diff --git a/src/testdir/dumps/Test_popupwin_scroll_9.dump b/src/testdir/dumps/Test_popupwin_scroll_9.dump index d2b7134bf..b471dc1bd 100644 --- a/src/testdir/dumps/Test_popupwin_scroll_9.dump +++ b/src/testdir/dumps/Test_popupwin_scroll_9.dump @@ -1,10 +1,10 @@ >1+0&#ffffff0| @73 |2| @73 -|3| @73 -|4| @31|f+0#0000001#ffd7ff255|i|v|e| @3| +0#0000000#ff404010| +0&#ffffff0@32 -|5| @31|s+0#0000001#ffd7ff255|i|x| @4| +0#0000000#ff404010| +0&#ffffff0@32 -|6| @31|s+0#0000001#ffd7ff255|e|v|e|n| @2| +0#0000000#4040ff13| +0&#ffffff0@32 -|7| @31|e+0#0000001#ffd7ff255|i|g|h|t| @2| +0#0000000#4040ff13| +0&#ffffff0@32 -|8| @73 +|3| @30|╔+0#0000001#ffd7ff255|═@8|X| +0#0000000#ffffff0@31 +|4| @30|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31 +|5| @30|║+0#0000001#ffd7ff255|s|i|x| @4| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31 +|6| @30|║+0#0000001#ffd7ff255|s|e|v|e|n| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31 +|7| @30|║+0#0000001#ffd7ff255|e|i|g|h|t| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31 +|8| @30|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@31 |9| @73 |:|c|a|l@1| |C|l|i|c|k|B|o|t|(|)| @40|1|,|1| @10|T|o|p| diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index 104ebd57d..1a39d284f 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -1580,6 +1580,7 @@ func Test_popup_scrollbar() call feedkeys("\<F4>\<LeftMouse>", "xt") endfunc func ClickBot() + call popup_setoptions(g:winid, {'border': [], 'close': 'button'}) call feedkeys("\<F5>\<LeftMouse>", "xt") endfunc map <silent> <F3> :call test_setmouse(5, 36)<CR> diff --git a/src/version.c b/src/version.c index 9d012bd2d..f274cef13 100644 --- a/src/version.c +++ b/src/version.c @@ -778,6 +778,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1666, +/**/ 1665, /**/ 1664, |