[vim/vim] 'Press ENTER or type command to continue' despite the text fitting perfectly fine (Issue #12570)

281 views
Skip to first unread message

wyot1

unread,
Jun 21, 2023, 4:40:19 AM6/21/23
to vim/vim, Subscribed

Steps to reproduce

Produce a line in any way, like an echo, and gradually add more characters to it. It will trigger the effect despite fitting.

image

It is not a case of a hidden newline:
image

Expected behaviour

Only trigger when there is actually more than fits.

Version of Vim

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Jun 18 2023 22:23:48) Included patches: 1-1640

Environment

Debian, but occurs anywhere that I can see

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12570@github.com>

Christian Brabandt

unread,
Jun 21, 2023, 4:59:28 AM6/21/23
to vim/vim, Subscribed

The localized error message must still fit on the last line, else you will see the "Press ENTER or type command to continue" message on the next line.

In addition, it matters whether you have enabled 'showcmd' and 'ruler'.
I did a quick test with a 80 column terminal using vim --clean and english locale:

Option message before it echos on the next line length (including Error Message)
set noruler noshowcmd E492: Not an editor command: ffffffffffffffffffffffffffffffffffffffffffffffffff 79
set ruler E492: Not an editor command: ffffffffffffffffffffffffffffffff 0,0-1 All 61
set ruler showcmd E492: Not an editor command: ffffffffffffffffffffff 0,0-1 All 51

I don't think this is an issue here. It just means, Vim will require some space for the ruler and the showcmd option and if it does not fit, it will show the additional "Press ENTER" message.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12570/1600460120@github.com>

wyot1

unread,
Jun 21, 2023, 5:06:32 AM6/21/23
to vim/vim, Subscribed

There's no error in my example, it's a plain echo.

Same effect with noruler and noshowcmd.
image

Why should that matter anyway, we're only talking about a single empty line? This whole line is free to be used:
image


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12570/1600471656@github.com>

Christian Brabandt

unread,
Jun 21, 2023, 5:13:30 AM6/21/23
to vim/vim, Subscribed

So have you 'ruler' and/or 'showcmd' in action?

This whole line is free to be used:

Except for the space reserved for those two settings, no?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12570/1600481902@github.com>

wyot1

unread,
Jun 21, 2023, 5:50:15 AM6/21/23
to vim/vim, Subscribed

So have you 'ruler' and/or 'showcmd' in action?

No. I set noruler noshowcmd.

Except for the space reserved for those two settings, no?

No, as when the echo runs, the line is empty.

stty size
25 80
vim --clean
set noruler noshowcmd
nnoremap <Leader>a :echo '000000000000000000000000000000000000000000000000000000000000012345678901'<cr>

goes from
image
to
image

At no time is anything displayed in the last empty line.

And it should never matter:

  • The ruler is in the statusline above in my first image and never even on that line.
  • When the echo happens, there is no cmd to be shown. As soon as the command is executed, it's no longer shown, thus the line is again empty.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12570/1600534364@github.com>

Reply all
Reply to author
Forward
0 new messages