~rkta/w3m#73: 
Menu size doesn't update after terminal size changes

When a menu doesn't fit into the screen, it puts : at the end to note that it can be scrolled: https://0x0.st/8TO1.png

However, if the parent terminal is resized, and the menu is called again, it won't get updated, and will have the same : to note that it still doesn't fit the screen: https://0x0.st/8TOe.png

Interestingly, it seems that if some option is set after that via :SET_OPTION command, then the menu size actually does get updated.

Important: this is not the same menu, which just doesn't get redrawn after the terminal changes (and which is probably expected): https://0x0.st/8TO_.png -- but a whole new menu called after the parent terminal resize.

Status
REPORTED
Submitter
~skejg
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~skejg a month ago

(On a side note, it could be handy if we could "cycle" the menu: to go to the last entry when we press 'Up' at the first entry, and vice versa :)

~rkta a month ago

On Sun, Feb 23, 2025 at 05:28:46AM +0000, ~skejg wrote:

When a menu doesn't fit into the screen, it puts : at the end to note that it can be scrolled: https://0x0.st/8TO1.png

However, if the parent terminal is resized, and the menu is called again, it won't get updated, and will have the same : to note that it still doesn't fit the screen: https://0x0.st/8TOe.png

I reuploaded the pictures to avoid the pictures to be deleted before the ticket is resolved:

http://rkta.de/pub/todo-73-menu-new.png http://rkta.de/pub/todo-73-menu-not-fit.png http://rkta.de/pub/todo-73-menu-resized.png

Interestingly, it seems that if some option is set after that via :SET_OPTION command, then the menu size actually does get updated.

Important: this is not the same menu, which just doesn't get redrawn after the terminal changes (and which is probably expected): https://0x0.st/8TO_.png -- but a whole new menu called after the parent terminal resize.

SET_OPTION/setOpt calls sync_with_option which calls initMenu which probably does something. :) You can achieve the same with REINIT.

I will have to check why w3m doesn't act accordingly on the SIGWINCH here. Thanks for the report.

Register here or Log in to comment, or comment via email.