0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.1874: modeless selection in popup window overlaps scrollbar

Problem:    Modeless selection in popup window overlaps scrollbar.
Solution:   Subtract scrollbar from max_col. (closes #4773)
This commit is contained in:
Bram Moolenaar
2019-08-17 19:10:53 +02:00
parent df70775555
commit 4dd751b956
4 changed files with 11 additions and 7 deletions

View File

@@ -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];