aligrudi / neatvi

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

:0 should go to first line #40

Closed mattn closed 2 years ago

kyx0r commented 2 years ago

Use :1 ?

mattn commented 2 years ago

:0 should also work.

aligrudi commented 2 years ago

mattn @.***> wrote:

:0 should lso work.

I think :0 is an error according to ex(1p). However, at the moment commands like :0p and :0r do not work and your patches solves this issue; I shall apply it.

I shall also apply the following patch to make ":2r !cmd" work.

Please report if you experience any problems.

Thanks, Ali

diff --git a/ex.c b/ex.c index 244c33f..e1790ee 100644 --- a/ex.c +++ b/ex.c @@ -359,15 +359,15 @@ static int ec_edit(char loc, char cmd, char arg) static int ec_read(char loc, char cmd, char arg) { char msg[128];

mattn commented 2 years ago

Traditional vi http://ex-vi.sourceforge.net/ works :0.

mattn commented 2 years ago

This PR already seems to be merged.

polluks commented 2 years ago

@mattn Indeed, just close this PR.