[hackers] [scroll] add script for scroll up testing || Jan Klemkow

From: <git_AT_suckless.org>
Date: Thu, 23 Apr 2020 23:09:32 +0200 (CEST)

commit 0c291ab3b61f2cd4c520a2b5c18724fc58276d2b
Author: Jan Klemkow <j.klemkow_AT_wemelug.de>
AuthorDate: Thu Apr 23 23:04:26 2020 +0200
Commit: Jan Klemkow <j.klemkow_AT_wemelug.de>
CommitDate: Thu Apr 23 23:09:18 2020 +0200

    add script for scroll up testing

diff --git a/ptty.c b/ptty.c
index ca3eb85..7f6df51 100644
--- a/ptty.c
+++ b/ptty.c
_AT_@ -130,7 +130,7 @@ main(int argc, char *argv[])
 
                         /* handle cursor position request */
                         if (strcmp("\033[6n", buf) == 0) {
- dprintf(mfd, "\033[%d;%dR", 1, 1);
+ dprintf(mfd, "\033[1;25R", 1, 1);
                                 break;
                         }
 
diff --git a/up.sh b/up.sh
new file mode 100755
index 0000000..329476e
--- /dev/null
+++ b/up.sh
_AT_@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -eu
+
+jot 50 > tmp.log
+
+(sleep 1; printf "\033[5;2~"; sleep 1; ) \
+ | ktrace -i ./ptty ./scroll ksh -c "tail -fn 50 tmp.log" > out.log
Received on Thu Apr 23 2020 - 23:09:32 CEST

This archive was generated by hypermail 2.3.0 : Thu Apr 23 2020 - 23:12:35 CEST