Skip to content

Always resize when in hit enter prompt - #20852

Open
64-bitman wants to merge 1 commit into
vim:masterfrom
64-bitman:wait_return_resize
Open

Always resize when in hit enter prompt#20852
64-bitman wants to merge 1 commit into
vim:masterfrom
64-bitman:wait_return_resize

Conversation

@64-bitman

Copy link
Copy Markdown
Contributor

If in a hit enter prompt and the shell size changes, it is supposedly postponed with MODE_SETWSIZE. However that does nothing because its called under the do while loop wait_return(), so the loop does not stop, resulting in Vim screen contents being messed up until some input is received (which causes the loop to stop).

@64-bitman 64-bitman changed the title Alwasys resize when in hit enter prompt Always resize when in hit enter prompt Jul 27, 2026
@64-bitman
64-bitman force-pushed the wait_return_resize branch from 7b91e59 to 7ca0f40 Compare July 27, 2026 01:47
@chrisbra

Copy link
Copy Markdown
Member

Hm, but that will always clear the hit enter prompt. when resizing while in a hit enter prompt

@64-bitman

Copy link
Copy Markdown
Contributor Author

Hm, but that will always clear the hit enter prompt. when resizing while in a hit enter prompt

Yes but without clearing the screen, the screen will be messed up on resize meaning you have to clear the screen manually anyways. Maybe it would be better to keep the hit enter prompt when resizing, but this seems like an edge case so im not sure if its worth it

@chrisbra

Copy link
Copy Markdown
Member

Hm, it is not quite correct. With your change MODE_SETWSIZE will become unused and I think we need to make a few more changes. Full patch would look like this, I think: https://gist.github.com/chrisbra/9edc20774d3ab63789b30f75c41523a7

This does properly redraw the hit-enter prompt on resize.

@64-bitman

Copy link
Copy Markdown
Contributor Author

Hm, it is not quite correct. With your change MODE_SETWSIZE will become unused and I think we need to make a few more changes. Full patch would look like this, I think: https://gist.github.com/chrisbra/9edc20774d3ab63789b30f75c41523a7

This does properly redraw the hit-enter prompt on resize.

The patch doesn't redraw the screen properly when the window size goes from smaller to bigger. I think clearing the screen (and the hit enter prompt) would be the simplest.

@chrisbra

Copy link
Copy Markdown
Member

The patch doesn't redraw the screen properly when the window size goes from smaller to bigger.

In a terminal you mean? I think that is the best we can do. In the gui it seemed to work for me.

@64-bitman

Copy link
Copy Markdown
Contributor Author

The patch doesn't redraw the screen properly when the window size goes from smaller to bigger.

In a terminal you mean? I think that is the best we can do. In the gui it seemed to work for me.

I was using the GTK4 GUI, maybe its possibly because of differences in the running Wayland compositor/wm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants