dashboard / vaxis / feat(vxfw/list): ability to set cursor #49 rss

open · opened on 2025-03-02T14:19:50Z by erock
Help
# add changes to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add 49
# add review to patch request
git format-patch main --stdout | ssh pr.pico.sh pr add --review 49
# remove patchset
ssh pr.pico.sh ps rm ps-x
# checkout all patches
ssh pr.pico.sh pr print 49 | git am -3
# print a diff between the last two patches in a patch request
ssh pr.pico.sh pr diff 49
# accept PR
ssh pr.pico.sh pr accept 49
# close PR
ssh pr.pico.sh pr close 49

Logs

erock created pr with ps-107 on 2025-03-02T14:19:50Z

Patchsets

ps-107 by erock on 2025-03-02T14:19:50Z

Patchset ps-107

feat(vxfw/list): ability to set cursor

Eric Bower
2025-03-02T14:18:48Z
Back to top

feat(vxfw/list): ability to set cursor

This allows end-developers the ability to set the currently selected
list item.
vxfw/list/list.go link
+5 -0
 1diff --git a/vxfw/list/list.go b/vxfw/list/list.go
 2index 2315c28..3c25d24 100644
 3--- a/vxfw/list/list.go
 4+++ b/vxfw/list/list.go
 5@@ -40,6 +40,11 @@ type scroll struct {
 6 	wantsCursor bool
 7 }
 8 
 9+func (d *Dynamic) SetCursor(c uint) {
10+	d.cursor = c
11+	d.ensureScroll()
12+}
13+
14 func (d *Dynamic) CaptureEvent(ev vaxis.Event) (vxfw.Command, error) {
15 	if d.DisableEventHandlers {
16 		return nil, nil