fix(users/Profpatsch/struct-edit): change arrow keys

Since items are aligned per-line, it makes more intuitive sense to use
up/down for previous/next item, and left to go up and right to go
down.

Change-Id: I6bc33bd4e6e8f9fb245d252ca063dfabf972147d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2864
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2021-04-05 23:35:00 +02:00
parent f57f1e4489
commit 77840fba2c

View file

@ -333,16 +333,16 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m, tea.Quit return m, tea.Quit
case "up": case "up":
m, err = m.ascend() m, err = m.prev()
case "down": case "down":
m, err = m.descend()
case "right":
m, err = m.next() m, err = m.next()
case "right":
m, err = m.descend()
case "left": case "left":
m, err = m.prev() m, err = m.ascend()
// case "enter": // case "enter":
// _, ok := m.selected[m.cursor] // _, ok := m.selected[m.cursor]