[Toybox] [PATCH] vi: fix recent changes.

enh enh at google.com
Mon Jan 10 19:07:12 PST 2022

vi was segfaulting because some of the printf() arguments were the wrong
way round. The file content also wasn't getting displayed because [%dH
isn't a correct translation of tty_jump(0, y). Personally, although I
agree that tty_esc() wasn't pulling its weight, I think that tty_jump()
was: the escape sequence's arguments are the wrong way round, they're
both off-by-one, and the rules for the short forms don't make sense to
humans, just to 1970s hardware.

Also remove the implicit flush from the inner redraw loop, which was
causing visible flicker (I've left the others since they don't matter).
 toys/pending/vi.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-vi-fix-recent-changes.patch
Type: text/x-patch
Size: 2927 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220110/fe5ffc82/attachment.bin>

More information about the Toybox mailing list