summaryrefslogtreecommitdiffhomepage
path: root/packages/tui/input/da1.go
diff options
context:
space:
mode:
Diffstat (limited to 'packages/tui/input/da1.go')
-rw-r--r--packages/tui/input/da1.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/tui/input/da1.go b/packages/tui/input/da1.go
new file mode 100644
index 000000000..c2cd94cf7
--- /dev/null
+++ b/packages/tui/input/da1.go
@@ -0,0 +1,18 @@
+package input
+
+import "github.com/charmbracelet/x/ansi"
+
+// PrimaryDeviceAttributesEvent is an event that represents the terminal
+// primary device attributes.
+type PrimaryDeviceAttributesEvent []int
+
+func parsePrimaryDevAttrs(params ansi.Params) Event {
+ // Primary Device Attributes
+ da1 := make(PrimaryDeviceAttributesEvent, len(params))
+ for i, p := range params {
+ if !p.HasMore() {
+ da1[i] = p.Param(0)
+ }
+ }
+ return da1
+}