neovim
neovim copied to clipboard
feat: disable press_enter messages when cmdheight = 0
Fix #20380
It improves cmdheight=0 behavior.
The command line redraw is executed when no messages.
NOTE: It is not perfect solution. The echoed text will be overwritten by redraw. I think it is trade off.
I have improved echo behavior when cmdheight=0.
I think it is better.
@bfredl What do you think?
I just tried it, it looks really good. Thank you!
I tried this and it's really weird, but sometimes it won't echo for me. I guess there is something to do with the redrawing and clearing of the text. I am not able to persistently recreate it as it seems to happen randomly. I'll attach a video showing what I mean:
https://user-images.githubusercontent.com/5160701/195175360-37dcafd5-39cf-45ee-8af7-8dbbefd34997.mov
If there is anything else I can try to do to figure out what may be happening, please let me know and I can try!
I tried this and it's really weird, but sometimes it won't echo for me. I guess there is something to do with the redrawing and clearing of the text.
It seems the text will be overwritten by statusline. I think the redraw is executed. You need to know it is not perfect solution. The echoed text will be overwritten easily.
Note: I cannot reproduce your problem though, if the message is really needed, echomsg is better.
I have updated the PR. Users need to press keys. I don't like the behavior but better.
It prevents the redraw problem.
Which behavior is better?
- No press-enter, but the messages are not displayed sometimes
- Press-enter, all messages are displayed
@Shougo I don't know how neovim works internally, but is it possible to make the default behavior customizable with global-options? Personally, I think it's better to show all messages with 'press enter' by default, and to allow the user to manually turn off that option and change the way the messages are displayed with a plugin like noice.nvim.
It is possible.
But I don't like adding options. It is the last resort.
I think the command line redraw will be improved by @bfredl .