From: Denys Vlasenko Date: Thu, 14 Sep 2017 11:57:07 +0000 (+0200) Subject: hexedit: position in correct column on "goto" command X-Git-Tag: 1_28_0~63 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9a4100cf53f75356854ce752374babf8135c3f42;p=oweals%2Fbusybox.git hexedit: position in correct column on "goto" command function old new delta hexedit_main 1169 1202 +33 Signed-off-by: Denys Vlasenko --- diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c index 1d683b7de..7e74e1f24 100644 --- a/miscutils/hexedit.c +++ b/miscutils/hexedit.c @@ -424,9 +424,11 @@ int hexedit_main(int argc UNUSED_PARAM, char **argv) if (t < 0) cnt = t = 0; G.offset = t; - remap(0); + remap(cnt & 0xf); redraw(); - cnt /= 16; + if (cnt & 0xf) + printf(ESC"[%uC", (cnt & 0xf) * 3); /* cursor right 3*i */ + cnt >>= 4; if (cnt) goto k_down; break;