[Toybox] [PATCH] vi: fix warnings, improve status display.

enh enh at google.com
Wed Jan 8 22:41:05 PST 2020


mbtowc(0, 0, 4) is weird, and ignoring the result is weird. Avoid all
this by just reusing the toybox lib utf8 functions.

Also fix the row/column display on the status line to count from 1 and
correctly distinguish bytes and characters in non-ASCII, and change the
mode output to only explicitly say when we're in insert mode, in the
same way that vim does. (Every time I saw the old blue-on-black text for
COMMAND I thought toybox vi had crashed!)
---
 toys/pending/vi.c | 93 +++++++++++------------------------------------
 1 file changed, 22 insertions(+), 71 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vi-fix-warnings-improve-status-display.patch
Type: text/x-patch
Size: 4514 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20200108/0a037a03/attachment-0002.bin>


More information about the Toybox mailing list