vi: don't touch file with :x when modified_count == 0
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 13 Mar 2017 19:50:42 +0000 (20:50 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 13 Mar 2017 19:50:42 +0000 (20:50 +0100)
commite88608eae24ae5934034e1ecb6c494fefbf1b9ae
treec9cbd901b79f338250ab243cc8522682b5da18de
parent02a2a278f6684f742fe131e1b598ca01cfa240db
vi: don't touch file with :x when modified_count == 0

Along with it, there are other changes

 - Check for uppercase X is removed as the expression will be always false and
   :X itself is another totally different command in standard vim
 - The status line will show number of written lines instead of lines requested
   by the colon command.  This is also how the standard vim is doing, though
   the difference is that '!' has to be explicitly specified in vim to allow
   partial writes

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/vi.c