This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch tymux-10-quiet-head
in repository terminology.

View the commit online.

commit 7d6187eddfd5e08989c32130b381b94f3b683ab8
Author: Boris Faure <[email protected]>
AuthorDate: Sun Nov 8 12:17:20 2026 +0000

    tests: add osc-8-move.sh to check link refcounts across cell moves
    
    Scrolls within margins, IL and DL move hyperlinked cells by copy, and
    each copy keeps the link refcounts. Nothing checked them: a refcount
    off by one either leaks a slot or frees a link still on screen. The new
    links opened at the end take the freed slots, so their ids show which
    links were freed.
---
 tests/osc-8-move.sh | 31 +++++++++++++++++++++++++++++++
 tests/tests.results |  1 +
 2 files changed, 32 insertions(+)

diff --git a/tests/osc-8-move.sh b/tests/osc-8-move.sh
new file mode 100644
index 00000000..ce31ef8e
--- /dev/null
+++ b/tests/osc-8-move.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Hyperlinked cells moved around by scrolls and line insertions. A link
+# whose last cell goes away frees its slot for the next link, so the ids
+# of the links opened at the end check the refcounts kept along the way.
+
+# clear screen, links on rows 1 to 8, each one in two runs
+printf '\033[2J'
+for i in 1 2 3 4 5 6 7 8; do
+  printf '\033[%d;1H\033]8;;http://row%d.example\033\\link %d' $i $i $i
+  printf '\033]8;;\033\\ plain \033]8;;http://row%d.example\033\\again' $i
+  printf '\033]8;;\033\\'
+done
+
+# scroll region rows 2 to 6: two of its links scroll out, row 6 is blank
+printf '\033[2;6r\033[6;1H\n\n'
+
+# insert and delete lines inside the region
+printf '\033[3;1H\033[L\033[4;1H\033[2M'
+
+# left and right margins: scroll columns 3 to 9 only, splitting the
+# runs of row 4 and scrolling out a link held by columns 4 to 6 only
+printf '\033[3;4H\033]8;;http://mid.example\033\\mid\033]8;;\033\\'
+printf '\033[?69h\033[3;9s\033[6;3H\n\n\n'
+printf '\033[?69l\033[r'
+
+# new links take the freed slots, lowest first
+for i in 1 2 3 4 5 6 7 8 9 10; do
+  printf '\033[%d;40H\033]8;;http://new%d.example\033\\new %d' $((i + 10)) $i $i
+  printf '\033]8;;\033\\'
+done
diff --git a/tests/tests.results b/tests/tests.results
index e306a50b..beb78958 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -215,6 +215,7 @@ dcs-full-buffer.sh f4cb1513ca59539f373e8d389e6ac01d
 csi-abort.sh 9dcaf308eaedd756a5f451ada391ba3e
 csi-shift.sh 1514d14cac76eb4d43f2a99a0c06179d
 osc-8.sh d8810df219faf4a8fe84fd08ed922695
+osc-8-move.sh 122b0fcf66562ea85527a8129806eeeb
 osc-8-unused.sh 17a5f346322188d6bf7b738a533eec5f
 osc-long.sh a94cb70dd58d07f52bbdf0cc5e7b95e1
 decfra-keep-colors.sh 84900ad5b5ffd5a14cb3318f63690691

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to