summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-17 19:10:53 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-17 19:10:53 +0200
commit4dd751b95696957c7baabad2f19f9e02fc596eae (patch)
tree08122621d7329f505874087863fc142801bbcac8 /src/ui.c
parentdf707755554ecc102a908e8d5b64f2903f4f3686 (diff)
downloadvim-git-4dd751b95696957c7baabad2f19f9e02fc596eae.tar.gz
patch 8.1.1874: modeless selection in popup window overlaps scrollbarv8.1.1874
Problem: Modeless selection in popup window overlaps scrollbar. Solution: Subtract scrollbar from max_col. (closes #4773)
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index 153d0203c..446cefcde 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -1098,7 +1098,8 @@ clip_start_selection(int col, int row, int repeated_click)
// Click in a popup window restricts selection to that window,
// excluding the border.
cb->min_col = wp->w_wincol + wp->w_popup_border[3];
- cb->max_col = wp->w_wincol + popup_width(wp) - wp->w_popup_border[1];
+ cb->max_col = wp->w_wincol + popup_width(wp)
+ - wp->w_popup_border[1] - wp->w_has_scrollbar;
if (cb->max_col > screen_Columns)
cb->max_col = screen_Columns;
cb->min_row = wp->w_winrow + wp->w_popup_border[0];