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
From 74c1f5e12f1c73a2176a818370e9b9b7a0a2a6dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jarno=20M=C3=A4kip=C3=A4=C3=A4?= <[email protected]>
Date: Thu, 26 Sep 2019 09:22:39 +0300
Subject: [PATCH] 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);
       }
-- 
2.19.1

_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to