From 49f9eda93864657a6a915ed36e4b0ff7f0e442a4 Mon Sep 17 00:00:00 2001 From: b9 Date: Thu, 19 Aug 2021 20:11:14 -0700 Subject: [PATCH] Presume sixel scrolling is enabled After purchasing a genuine DEC VT340 terminal, hackerb9 has learned that the DEC VT340 graphics programmer's manual was mistaken and the sense of DECSDM should be inverted. Nearly every terminal emulator which built upon that reference over the last thirty years is incorrect. Some are correcting the error now, some never were wrong, but we are at a time when it is not safe to presume what setting DECSDM means. For now, lsix will simply presume that sixel scrolling is enabled and hope that no program has been run before it that disables it. See https://github.com/hackerb9/lsix/issues/41 for details. Thanks go to @j4james for pointing out the mistake and for testing multiple terminal emulators to show that none of them currently default to having sixel scrolling disabled. --- lsix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lsix b/lsix index b9b33c0..f682308 100755 --- a/lsix +++ b/lsix @@ -111,13 +111,8 @@ autodetect() { exit 1 fi - # ENABLE SIXEL SCROLLING so image will appear right after cursor. - if [[ $TERM != "mlterm" ]]; then - echo -ne $'\e[?80h' - else - # Except... mlterm (as of 3.5.0) has a bug that reverses the sense - echo -ne $'\e[?80l' - fi + # SIXEL SCROLLING (~DECSDM) is now presumed to be enabled. + # See https://github.com/hackerb9/lsix/issues/41 for details. # TERMINAL COLOR AUTODETECTION. # Find out how many color registers the terminal has