Files
cclip/vendor/github.com/charmbracelet/x/input/da1.go
PhatPhuckDave 3c5e991ec5 Add vendor
Specifically because I want to modify a dependency
2024-08-26 01:01:04 +02:00

19 lines
447 B
Go

package input
import "github.com/charmbracelet/x/ansi"
// PrimaryDeviceAttributesEvent represents a primary device attributes event.
type PrimaryDeviceAttributesEvent []uint
func parsePrimaryDevAttrs(csi *ansi.CsiSequence) Event {
// Primary Device Attributes
da1 := make(PrimaryDeviceAttributesEvent, len(csi.Params))
csi.Range(func(i int, p int, hasMore bool) bool {
if !hasMore {
da1[i] = uint(p)
}
return true
})
return da1
}