diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-14 13:57:07 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-09-14 13:57:07 +0200 |
commit | 9a4100cf53f75356854ce752374babf8135c3f42 (patch) | |
tree | d915e63764850d001d7130b3ac826c7a5a6b69d0 | |
parent | 44cb1666ef4403a0fa8838d49006567ac960b33a (diff) | |
download | busybox-w32-9a4100cf53f75356854ce752374babf8135c3f42.tar.gz busybox-w32-9a4100cf53f75356854ce752374babf8135c3f42.tar.bz2 busybox-w32-9a4100cf53f75356854ce752374babf8135c3f42.zip |
hexedit: position in correct column on "goto" command
function old new delta
hexedit_main 1169 1202 +33
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/hexedit.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
424 | if (t < 0) | 424 | if (t < 0) |
425 | cnt = t = 0; | 425 | cnt = t = 0; |
426 | G.offset = t; | 426 | G.offset = t; |
427 | remap(0); | 427 | remap(cnt & 0xf); |
428 | redraw(); | 428 | redraw(); |
429 | cnt /= 16; | 429 | if (cnt & 0xf) |
430 | printf(ESC"[%uC", (cnt & 0xf) * 3); /* cursor right 3*i */ | ||
431 | cnt >>= 4; | ||
430 | if (cnt) | 432 | if (cnt) |
431 | goto k_down; | 433 | goto k_down; |
432 | break; | 434 | break; |