Mercurial > vim
comparison src/popupmenu.c @ 18665:7369756d05de v8.1.2324
patch 8.1.2324: with of scrollbar in popup menu not taken into account
Commit: https://github.com/vim/vim/commit/202c3f7e3e5a90135ad37100fbfd6583c84a6c99
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 21 12:12:35 2019 +0100
patch 8.1.2324: with of scrollbar in popup menu not taken into account
Problem: With of scrollbar in popup menu not taken into account.
Solution: Add the width of the scrollbar.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Nov 2019 12:15:06 +0100 |
parents | 81272918c0ea |
children | de350001150c |
comparison
equal
deleted
inserted
replaced
18664:daa71bf6b546 | 18665:7369756d05de |
---|---|
626 * Position the info popup relative to the popup menu item. | 626 * Position the info popup relative to the popup menu item. |
627 */ | 627 */ |
628 void | 628 void |
629 pum_position_info_popup(win_T *wp) | 629 pum_position_info_popup(win_T *wp) |
630 { | 630 { |
631 int col = pum_col + pum_width + 1; | 631 int col = pum_col + pum_width + pum_scrollbar + 1; |
632 int row = pum_row; | 632 int row = pum_row; |
633 int botpos = POPPOS_BOTLEFT; | 633 int botpos = POPPOS_BOTLEFT; |
634 | 634 |
635 wp->w_popup_pos = POPPOS_TOPLEFT; | 635 wp->w_popup_pos = POPPOS_TOPLEFT; |
636 if (Columns - col < 20 && Columns - col < pum_col) | 636 if (Columns - col < 20 && Columns - col < pum_col) |
743 pum_first = pum_size - pum_height; | 743 pum_first = pum_size - pum_height; |
744 | 744 |
745 #if defined(FEAT_QUICKFIX) | 745 #if defined(FEAT_QUICKFIX) |
746 /* | 746 /* |
747 * Show extra info in the preview window if there is something and | 747 * Show extra info in the preview window if there is something and |
748 * 'completeopt' contains "preview" or "popup". | 748 * 'completeopt' contains "preview" or "popup" or "popuphidden". |
749 * Skip this when tried twice already. | 749 * Skip this when tried twice already. |
750 * Skip this also when there is not much room. | 750 * Skip this also when there is not much room. |
751 * NOTE: Be very careful not to sync undo! | 751 * NOTE: Be very careful not to sync undo! |
752 */ | 752 */ |
753 if (pum_array[pum_selected].pum_info != NULL | 753 if (pum_array[pum_selected].pum_info != NULL |