Browse Source

Merge branch 'shortcuts' into 'master'

Add j/k/g/G shortcuts for moving inside list

See merge request tslocum/cview!2
tablepad
Trevor Slocum 2 years ago
parent
commit
e6df89b803
  1. 9
      list.go

9
list.go

@ -936,6 +936,15 @@ func (l *List) InputHandler() func(event *tcell.EventKey, setFocus func(p Primit
}
}
if !found {
if ch == 'j' {
l.transform(TransformNextItem)
} else if ch == 'k' {
l.transform(TransformPreviousItem)
} else if ch == 'g' {
l.transform(TransformFirstItem)
} else if ch == 'G' {
l.transform(TransformLastItem)
}
break
}
}

Loading…
Cancel
Save