[Toybox] [PATCH] vi: changes to buffer drawing

Jarno Mäkipää jmakip87 at gmail.com
Sun Sep 15 06:05:47 PDT 2019


Replaced: draw_str_until with lib/crunch_str() where possible

Removed: Unused char draw functions.

Implemented: crunch_nstr() which is crunch_str with additional check
for byte length, this can be used to draw substrings or non null
terminated strings. (This can be moved to lib/ if its useful for others)

Reimplemented: Buffer drawing without line wrapping. Now too long lines are
drawn with @ in end. And cursor line scrolls left and right when hitting
right margin point. This will simplify buffer handling alot.
Linewrapping can be reimplemented later if needed but will add
complexity

Implemented: set list and set nolist ex commands, set list will show
escape codes such as tabs

Fix: Bug on splitting 2 lines, split was 1 byte off.

-Jarno

---
 toys/pending/vi.c | 314 ++++++++++++++++++++++------------------------
 1 file changed, 153 insertions(+), 161 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vi-changes-to-buffer-drawing.patch
Type: text/x-patch
Size: 12618 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190915/4ab2ff51/attachment-0002.bin>


More information about the Toybox mailing list