[vim/vim] popup width rule is documented incorrectly (PR #20870)

h_east (Vim Github Repository) <[email protected]> Wed, 29 Jul 2026 06:19:39 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/pull/[email protected]>
```
Problem:  The documentation says the width of a popup window is equal to
          the longest visible line, while since 9.2.0419 it is the
          longest line in the buffer, also when that line is not
          displayed.
Solution: Update the documentation and correct a comment that says
          otherwise.
```

---

### Notes

Reported on vim_use:
https://groups.google.com/g/vim_use/c/_rOLxGz5kNM

related: #20042 (9.2.0419)  (cc: @mattn )
No. 2 of #20042 changed the width to be computed from every buffer line so that
it does not change while scrolling through the popup, which matters when
scrolling with the mouse: a popup that changes width under the pointer
moves out from under it.  This also matches the popup menu, which sizes
itself to the longest of all its items.  The documentation was not
updated at the time, so the behaviour looked like "maxwidth is ignored".

No test is added: Test_popup_firstline_dump() already covers the rule,
its screen dump was updated by 9.2.0419 for exactly this reason.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20870

-- Commit Summary --

  * popup width rule is documented incorrectly

-- File Changes --

    M runtime/doc/popup.txt (8)
    M src/popupwin.c (3)

-- Patch Links --

https://github.com/vim/vim/pull/20870.patch
https://github.com/vim/vim/pull/20870.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20870
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/pull/[email protected]>

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20870%40github.com.