aligrudi / neatvi

A small vi/ex editor for editing UTF-8 text
http://litcave.rudi.ir/
305 stars 25 forks source link

Skip command confirmation when only one line #71

Closed lobre closed 8 months ago

lobre commented 9 months ago

I think that could be valuable to skip the [enter to continue] prompt after an ex command when there is only one line printed.

As we always have the last terminal line reserved for the prompt, having one line printed fits into this prompt line.

For instance: 2p simply prints line 2. I am not sure the [enter to continue] prompt is needed for single-line prints, as it shifts the whole viewport one line and it can be disturbing.

aligrudi commented 8 months ago

Loric Brevet @.***> wrote:

I think that could be valuable to skip the [enter to continue] prompt after an ex command when there is only one line printed.

As we always have the last terminal line reserved for the prompt, having one line printed fits into this prompt line.

For instance: 2p simply prints line 2. I am not sure the [enter to continue] prompt is needed for single-line prints, as it shifts the whole viewport one line and it can be disturbing.

Done. Please report if there are any issues.

Also, now insert mode screen updates are limited to the current window.

Ali
lobre commented 8 months ago

Done. Please report if there are any issues.

Thank you a lot!

Is it normal that I still have the [enter to continue] when executing a shell command that only outputs one line? Such as :!echo hello.

aligrudi commented 8 months ago

Loric Brevet @.***> wrote:

Done. Please report if there are any issues.

Thank you a lot!

Is it normal that I still have the [enter to continue] when executing a shell command that only outputs one line? Such as :!echo hello.

Shell commands write the output directly to the terminal and Neatvi does not know how many lines have been written. So it always shows this prompt.

Ali
lobre commented 8 months ago

Neatvi does not know how many lines have been written.

Understood thank you. I am closing this issue then, as I think the initial topic has been answered.