Bug in popup maxwidth?

30 views
Skip to first unread message

Salman Halim

unread,
May 27, 2026, 10:25:11 AMMay 27
to Vim Users
Hello,

GVim 9.2, patch 541, Windows 11.

My popups are as wide as the widest line, ignoring the maxwidth setting. This was working fine in 9.1, patch 2125, from where I upgraded yesterday.

The maxheight works fine.

--
 
Salman

I, too, shall something make and glory in the making.

h_east

unread,
9:33 AM (3 hours ago) 9:33 AM
to vim_use
Hi,

"maxwidth" still limits the width, what changed is how the width is
computed.  Since patch 9.2.0419 it is the longest line in the whole
buffer, not the longest displayed line, so that the width does not change
while you scroll the popup with the mouse wheel.  The completion menu
works the same way.

So a buffer with one long line now sits at "maxwidth" all the time.  The
documentation still described the old rule, which is being corrected:
https://github.com/vim/vim/pull/20870

If that is too wide, lower "maxwidth".

--
Best regards,
Hirohito Higashi (h_east)

2026年5月27日水曜日 23:25:11 UTC+9 Salman Halim:

Salman Halim

unread,
10:59 AM (2 hours ago) 10:59 AM
to Vim Users

On Wed, 29 Jul 2026, 09:33 h_east, <h.eas...@gmail.com> wrote:
Hi,

"maxwidth" still limits the width, what changed is how the width is
computed.  Since patch 9.2.0419 it is the longest line in the whole
buffer, not the longest displayed line, so that the width does not change
while you scroll the popup with the mouse wheel.  The completion menu
works the same way.

So a buffer with one long line now sits at "maxwidth" all the time.  The
documentation still described the old rule, which is being corrected:
https://github.com/vim/vim/pull/20870

If that is too wide, lower "maxwidth".

--
Best regards,
Hirohito Higashi (h_east)

I get all that. The problem is that popup_getoptions says that maxwidth and minwidth are both 50 and popup_getpos says core_width is 93 and width is 99. I can confirm that the popup on-screen is, indeed, very wide. 

Padding (from the options) is [1, 2, 1, 2], in case you want that, also. 

Salman 

h_east

unread,
11:24 AM (1 hour ago) 11:24 AM
to vim_use
Hi, 

I get all that. The problem is that popup_getoptions says that maxwidth and minwidth are both 50 and popup_getpos says core_width is 93 and width is 99. I can confirm that the popup on-screen is, indeed, very wide. 

Hmm, I can't reproduce the issue.
Could you please paste the script you actually verified?
Reply all
Reply to author
Forward
0 new messages