[PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-12 Thread Yousong Zhou
This is the behaviour observed with standard vim and busybox vi of at least 1.22.1. It was changed with commit "32afd3a vi: some simplifications" which happened before 1.23.0. Mistyping filename on command line happens fairly often and it's better we restore the old behaviour to avoid a few unnec

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Yousong Zhou
On 13 February 2017 at 11:00, Yousong Zhou wrote: > This is the behaviour observed with standard vim and busybox vi of at > least 1.22.1. It was changed with commit "32afd3a vi: some > simplifications" which happened before 1.23.0. > > Mistyping filename on command line happens fairly often and i

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: > On 13 February 2017 at 11:00, Yousong Zhou wrote: >> This is the behaviour observed with standard vim and busybox vi of at >> least 1.22.1. It was changed with commit "32afd3a vi: some >> simplifications" which happened before 1.23.0. >> >>

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Yousong Zhou
On 20 February 2017 at 19:02, Kang-Che Sung wrote: > On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: >> On 13 February 2017 at 11:00, Yousong Zhou wrote: >>> This is the behaviour observed with standard vim and busybox vi of at >>> least 1.22.1. It was changed with commit "32afd3a vi: some

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 7:12 PM, Yousong Zhou wrote: > On 20 February 2017 at 19:02, Kang-Che Sung wrote: >> On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: >>> On 13 February 2017 at 11:00, Yousong Zhou wrote: This is the behaviour observed with standard vim and busybox vi of at

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Yousong Zhou
On 20 February 2017 at 19:30, Kang-Che Sung wrote: > On Mon, Feb 20, 2017 at 7:12 PM, Yousong Zhou wrote: >> On 20 February 2017 at 19:02, Kang-Che Sung wrote: >>> On Mon, Feb 20, 2017 at 4:40 PM, Yousong Zhou wrote: On 13 February 2017 at 11:00, Yousong Zhou wrote: > This is the beha

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Kang-Che Sung
On Mon, Feb 20, 2017 at 7:58 PM, Yousong Zhou wrote: > Well, I guess :x and ZZ are different since the early days of busybox > vi: it's the case with 1.20.0 and 1.22.1. The case with ZZ is more > substantial both as a regression and as a flaw even when looking it > alone without comparison with t

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-02-20 Thread Yousong Zhou
On 20 February 2017 at 20:24, Kang-Che Sung wrote: > On Mon, Feb 20, 2017 at 7:58 PM, Yousong Zhou wrote: >> Well, I guess :x and ZZ are different since the early days of busybox >> vi: it's the case with 1.20.0 and 1.22.1. The case with ZZ is more >> substantial both as a regression and as a fl

Re: [PATCH] vi: avoid touching a new file with ZZ when no editing has been done

2017-03-24 Thread Denys Vlasenko
On Mon, Feb 13, 2017 at 4:00 AM, Yousong Zhou wrote: > This is the behaviour observed with standard vim and busybox vi of at > least 1.22.1. It was changed with commit "32afd3a vi: some > simplifications" which happened before 1.23.0. > > Mistyping filename on command line happens fairly often an