mirror of
https://github.com/vim/vim.git
synced 2025-11-10 10:47:23 -05:00
patch 9.0.1432: completion popup in wrong position with virtual text "above"
Problem: Completion popup in wrong position with virtual text "above". Solution: Adjust the column. (closes #12210)
This commit is contained in:
@@ -238,13 +238,16 @@ pum_display(
|
||||
// cmdline completion popup menu
|
||||
cursor_col = cmdline_compl_startcol();
|
||||
else
|
||||
{
|
||||
// w_wcol includes virtual text "above"
|
||||
int wcol = curwin->w_wcol % curwin->w_width;
|
||||
#ifdef FEAT_RIGHTLEFT
|
||||
if (right_left)
|
||||
cursor_col = curwin->w_wincol + curwin->w_width
|
||||
- curwin->w_wcol - 1;
|
||||
else
|
||||
if (right_left)
|
||||
cursor_col = curwin->w_wincol + curwin->w_width - wcol - 1;
|
||||
else
|
||||
#endif
|
||||
cursor_col = curwin->w_wincol + curwin->w_wcol;
|
||||
cursor_col = curwin->w_wincol + wcol;
|
||||
}
|
||||
|
||||
// if there are more items than room we need a scrollbar
|
||||
if (pum_height < size)
|
||||
|
||||
Reference in New Issue
Block a user