]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Add Term::_csi_h and Term::_csi_l
authorTom de Vries <tdevries@suse.de>
Fri, 15 Aug 2025 12:48:10 +0000 (14:48 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 15 Aug 2025 12:48:10 +0000 (14:48 +0200)
Add support for:
- Set Mode (SM)
  CSI h
- Reset Mode (RM)
  CSI l

gdb/testsuite/lib/tuiterm.exp

index ecb2c30cbfc240883add05657a9ff01ab18f3da5..4129a6d43d6846cb29cf3b60bd902afffa0d094e 100644 (file)
@@ -592,6 +592,40 @@ proc Term::_csi_d {args} {
     }
 }
 
+# Set Mode (SM, CSI h)
+#
+# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+proc Term::_csi_h { args } {
+    foreach item $args {
+       switch -exact -- $item {
+           4 {
+               # Insert Mode (IRM)
+               _log "ignored: insert mode"
+           }
+           default {
+               error unsupported
+           }
+       }
+    }
+}
+
+# Reset Mode (RM, CSI l)
+#
+# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+proc Term::_csi_l { args } {
+    foreach item $args {
+       switch -exact -- $item {
+           4 {
+               # Replace Mode (IRM)
+               _log "ignored: replace mode"
+           }
+           default {
+               error unsupported
+           }
+       }
+    }
+}
+
 # Reset the attributes in attributes array UPVAR_NAME to the default values.
 proc Term::_reset_attrs { upvar_name } {
     upvar $upvar_name var