diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-24 18:59:55 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-24 18:59:55 +0100 |
commit | bb008dd3239c5fe3ac04501e38e4c950fa9426c8 (patch) | |
tree | 6ece272d36f2fc6c51a37c1d9d0aa827886eefdb /src/popupmnu.c | |
parent | 085346f5a1ab5828b1fd80990d93172440c54724 (diff) | |
download | vim-bb008dd3239c5fe3ac04501e38e4c950fa9426c8.zip |
patch 8.0.1538: popupmenu is too far left when completion is long
Problem: Popupmenu is too far left when completion is long. (Linwei)
Solution: Adjust column computations. (Hirohito Higashi, closes #2661)
Diffstat (limited to 'src/popupmnu.c')
-rw-r--r-- | src/popupmnu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/popupmnu.c b/src/popupmnu.c index dfdcca072..6ac121d91 100644 --- a/src/popupmnu.c +++ b/src/popupmnu.c @@ -253,7 +253,7 @@ pum_display( /* align right pum edge with "col" */ #ifdef FEAT_RIGHTLEFT if (curwin->w_p_rl - && col < max_width + pum_scrollbar + 1) + && W_ENDCOL(curwin) < max_width + pum_scrollbar + 1) { pum_col = col + max_width + pum_scrollbar + 1; if (pum_col >= Columns) @@ -262,7 +262,7 @@ pum_display( else if (!curwin->w_p_rl) #endif { - if (col > Columns - max_width - pum_scrollbar) + if (curwin->w_wincol > Columns - max_width - pum_scrollbar) { pum_col = Columns - max_width - pum_scrollbar; if (pum_col < 0) |