From 9837e2bfaea0c703c5f4cfd81d1fedb478806ea8 Mon Sep 17 00:00:00 2001 From: Jarno Mäkipää Date: Thu, 26 Sep 2019 09:22:39 +0300 Subject: 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 --- toys/other/hexedit.c | 5 +++-- 1 file 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); } -- cgit v1.2.3