Thursday, July 30, 2026

Re: Bug in popup maxwidth?

Excellent! Thank you. 

Sorry I missed your last message asking for a sample. Something came up that took all my time. 

Salman

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


On Thu, 30 Jul 2026, 10:05 h_east, <h.east.727@gmail.com> wrote:
Hi,

Thanks, those numbers were enough to reproduce it here.

It happens when 'wrap' is off and the popup is so close to the right
edge that the space left of it is smaller than "maxwidth".  On a 120
column screen:

    call popup_create([repeat('x', 93)],
                \ #{line: 3, col: 80, maxwidth: 50, wrap: 0, border: []})

The popup is shifted left to fit the text on the screen, and that shift
raises the width limit itself.  Patch 9.2.0247 already guarded against
this, but only for 'wrap' being on.

Fix: https://github.com/vim/vim/pull/20883

--
Best regards,
Hirohito Higashi (h_east)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/fa0b32e3-2b25-49da-87a2-ac2a431a1dc7n%40googlegroups.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CANuxnEfUZCvruqajRiZWsnyUYYJKnCNFz%3D%2BbmkarXNQC9%2B6vZA%40mail.gmail.com.

Re: Bug in popup maxwidth?

Hi,

Thanks, those numbers were enough to reproduce it here.

It happens when 'wrap' is off and the popup is so close to the right
edge that the space left of it is smaller than "maxwidth".  On a 120
column screen:

    call popup_create([repeat('x', 93)],
                \ #{line: 3, col: 80, maxwidth: 50, wrap: 0, border: []})

The popup is shifted left to fit the text on the screen, and that shift
raises the width limit itself.  Patch 9.2.0247 already guarded against
this, but only for 'wrap' being on.

Fix: https://github.com/vim/vim/pull/20883

--
Best regards,
Hirohito Higashi (h_east)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/fa0b32e3-2b25-49da-87a2-ac2a431a1dc7n%40googlegroups.com.

Wednesday, July 29, 2026

Re: Bug in popup with opacity?

Confirming that this worked. Thank you!

 
Salman

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


On Wed, 29 Jul 2026, 07:23 h_east, <h.east.727@gmail.com> wrote:
Hi,

Yes, this is a bug. I have fixed it and submitted a pull request.

--
Best regards,
Hirohito Higashi (h_east)

2026年5月27日水曜日 22:46:56 UTC+9 Salman Halim:
Hello,

I am on GVim 9.2, patch 541, on Windows 11.

If I set opacity in a popup to anything but 100, my font settings aren't observed. For example, my 'InfoBorder' (used for borderhighlight) is set to:

InfoBorder     xxx guibg=#6f4246 font=Consolas:h9

If the opacity is either unspecified or explicitly set to 100, the font is observed. Any actual opacity and the font is ignored and goes to the regular font used throughout.

Thank you.

--
 
Salman

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

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/a19eb99f-2f35-4b8e-8b00-abf3d0f03465n%40googlegroups.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CANuxnEcb3cW8OvarDAeRXdte5ZNQOYgSOZXRD%3DgCOv6jhRXyHg%40mail.gmail.com.

Re: Bug in popup maxwidth?

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?

--
Best regards,
Hirohito Higashi (h_east)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/1012b43a-7e52-478a-a5e0-803a3b4800efn%40googlegroups.com.

Re: Bug in popup maxwidth?


On Wed, 29 Jul 2026, 09:33 h_east, <h.east.727@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 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CANuxnEcp8C29PXosyADcVKCJ506Hmt8Jui2xOd4R1DBTMGwucQ%40mail.gmail.com.

Re: Bug in popup maxwidth?

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:
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.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/353a95ad-1519-4b32-82a7-64d8ca8a4618n%40googlegroups.com.

Re: Bug in popup with opacity?

Hi,

Yes, this is a bug. I have fixed it and submitted a pull request.
https://github.com/vim/vim/pull/20866

--
Best regards,
Hirohito Higashi (h_east)

2026年5月27日水曜日 22:46:56 UTC+9 Salman Halim:
Hello,

I am on GVim 9.2, patch 541, on Windows 11.

If I set opacity in a popup to anything but 100, my font settings aren't observed. For example, my 'InfoBorder' (used for borderhighlight) is set to:

InfoBorder     xxx guibg=#6f4246 font=Consolas:h9

If the opacity is either unspecified or explicitly set to 100, the font is observed. Any actual opacity and the font is ignored and goes to the regular font used throughout.

Thank you.

--
 
Salman

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

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/a19eb99f-2f35-4b8e-8b00-abf3d0f03465n%40googlegroups.com.