[Toybox] [PATCH] vi: small fixes.

enh enh at google.com
Sat Sep 7 00:20:10 PDT 2019


I really needed to be able to edit a file on the device, and this was
the nearest thing handy, and it turns out to be more or less usable for
basic editing, so...

Support cursor keys.

Support :q (since there's currently no record of whether the file's
modified or not, :q is the same as :q!).

Add 'A' to insert at end of line.

Add 'n' to find next after '/'.

Fix backspace all the way to get out of ex command mode.

Fix escape sequences to not hard-code assumptions about the terminal's
default background and foreground colors.

Fix 'spesial' typo for 'special', and remove explicit array sizes.
---
 toys/pending/vi.c | 109 ++++++++++++++++++++++++++++------------------
 1 file changed, 66 insertions(+), 43 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vi-small-fixes.patch
Type: text/x-patch
Size: 7964 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190907/728cd85b/attachment-0001.bin>


More information about the Toybox mailing list