From 77840fba2c1e4e900e27df0163f39ccc7a0c48a6 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 5 Apr 2021 23:35:00 +0200 Subject: 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 --- users/Profpatsch/struct-edit/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'users/Profpatsch') diff --git a/users/Profpatsch/struct-edit/main.go b/users/Profpatsch/struct-edit/main.go index 06d05a695d08..f40c6df66db8 100644 --- a/users/Profpatsch/struct-edit/main.go +++ b/users/Profpatsch/struct-edit/main.go @@ -333,16 +333,16 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, tea.Quit case "up": - m, err = m.ascend() + m, err = m.prev() case "down": - m, err = m.descend() + m, err = m.next() case "right": - m, err = m.next() + m, err = m.descend() case "left": - m, err = m.prev() + m, err = m.ascend() // case "enter": // _, ok := m.selected[m.cursor] -- cgit 1.4.1