From 675ee057e06578e8d87ed2ea54ab8915caecdb0f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 29 Mar 2025 06:35:11 +0800 Subject: vim-patch:9.1.1255: missing test condition for 'pummaxwidth' setting Problem: missing test condition for 'pummaxwidth' setting, pummaxwidth not effective when width is 32 and height is 10 (after v9.1.1250) Solution: add missing comparison condition in pum_width() (glepnir) closes: vim/vim#16999 https://github.com/vim/vim/commit/532c5aec6fa8f0a3d743c7d1573d25d75dd36d5f Co-authored-by: glepnir --- src/nvim/popupmenu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/nvim/popupmenu.c b/src/nvim/popupmenu.c index 75f1c93ed7..4ce4f9632f 100644 --- a/src/nvim/popupmenu.c +++ b/src/nvim/popupmenu.c @@ -391,6 +391,8 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i if (p_pmw > 0 && pum_width > p_pmw) { pum_width = (int)p_pmw; } + } else if (p_pmw > 0 && pum_width > p_pmw) { + pum_width = (int)p_pmw; } } } else if (max_col - min_col < def_width) { -- cgit