Mercurial > vim
changeset 13328:2c639a9a4def
patch 8.0.1538: popupmenu is too far left when completion is long
commit https://github.com/vim/vim/commit/bb008dd3239c5fe3ac04501e38e4c950fa9426c8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 24 18:59:55 2018 +0100
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 https://github.com/vim/vim/issues/2661)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 24 Feb 2018 19:00:05 +0100 |
parents | e32f79483a08 |
children | 424321d6eea7 |
files | src/popupmnu.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)