aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-10 20:53:13 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-29 18:34:04 -0500
commit51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2 (patch)
treeee2c9466294f3b8a2f2b6a65d56a6402461c555d /src
parentd56f36f46c400ead225caaef8ac2717ff1e4bfec (diff)
downloadrneovim-51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2.tar.gz
rneovim-51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2.tar.bz2
rneovim-51c9e3c4d19f26af11a86a8f736a74a5cb6f2fa2.zip
vim-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 vim/vim#2661) https://github.com/vim/vim/commit/bb008dd3239c5fe3ac04501e38e4c950fa9426c8
Diffstat (limited to 'src')
-rw-r--r--src/nvim/popupmnu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c
index a715129f8a..d53f2c2c7b 100644
--- a/src/nvim/popupmnu.c
+++ b/src/nvim/popupmnu.c
@@ -306,13 +306,13 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed,
|| col < Columns - max_width))) {
// align right pum edge with "col"
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) {
pum_col = Columns - 1;
}
} else if (!curwin->w_p_rl) {
- if (col > Columns - max_width - pum_scrollbar) {
+ if (curwin->w_wincol > Columns - max_width - pum_scrollbar) {
pum_col = col - max_width - pum_scrollbar;
if (pum_col < 0) {
pum_col = 0;