summaryrefslogtreecommitdiff
path: root/miscutils/hexedit.c
diff options
context:
space:
mode:
authorDenys Vlasenko2017-09-14 13:57:07 +0200
committerDenys Vlasenko2017-09-14 13:57:07 +0200
commit9a4100cf53f75356854ce752374babf8135c3f42 (patch)
treed915e63764850d001d7130b3ac826c7a5a6b69d0 /miscutils/hexedit.c
parent44cb1666ef4403a0fa8838d49006567ac960b33a (diff)
downloadbusybox-9a4100cf53f75356854ce752374babf8135c3f42.zip
busybox-9a4100cf53f75356854ce752374babf8135c3f42.tar.gz
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>
Diffstat (limited to 'miscutils/hexedit.c')
-rw-r--r--miscutils/hexedit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c
index 1d683b7..7e74e1f 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;