aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorJarno Mäkipää <jmakip87@gmail.com>2019-09-26 09:22:39 +0300
committerRob Landley <rob@landley.net>2019-09-26 11:01:51 -0500
commit9837e2bfaea0c703c5f4cfd81d1fedb478806ea8 (patch)
tree150d0a2506134f633e7120bf0d305d84ed64823a /toys/other
parent51cc908ee40615b6bb162674f2466cb5b8795c57 (diff)
downloadtoybox-9837e2bfaea0c703c5f4cfd81d1fedb478806ea8.tar.gz
hexedit: fix scrolling on legacy terminals
Thanks for James McMechan for pointing this out. Using esc[1L and esc[1M escapes with cursor jump to 1, 1 to make scrolling effect instead of S and T fixes scrolling inside Linux terminal and tmux -Jarno
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/hexedit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toys/other/hexedit.c b/toys/other/hexedit.c
index 809340a1..4b628463 100644
--- a/toys/other/hexedit.c
+++ b/toys/other/hexedit.c
@@ -158,8 +158,8 @@ void hexedit_main(void)
} else {
TT.base--;
i++;
- tty_esc("1T");
tty_jump(0, 0);
+ tty_esc("1L");
draw_line(0);
}
}
@@ -170,7 +170,8 @@ void hexedit_main(void)
} else {
TT.base++;
i++;
- tty_esc("1S");
+ tty_jump(0, 0);
+ tty_esc("1M");
tty_jump(0, TT.height-1);
draw_line(TT.height-1);
}