(event *tcell.EventKey, pendingG *bool, jumpTop func(), jumpBottom func())
| 6 | ) |
| 7 | |
| 8 | func handleVimTopBottomRune(event *tcell.EventKey, pendingG *bool, jumpTop func(), jumpBottom func()) bool { |
| 9 | if event.Key() != tcell.KeyRune { |
| 10 | *pendingG = false |
| 11 | return false |
| 12 | } |
| 13 | |
| 14 | switch event.Rune() { |
| 15 | case 'g': |
| 16 | if *pendingG { |
| 17 | *pendingG = false |
| 18 | jumpTop() |
| 19 | } else { |
| 20 | *pendingG = true |
| 21 | } |
| 22 | return true |
| 23 | case 'G': |
| 24 | *pendingG = false |
| 25 | jumpBottom() |
| 26 | return true |
| 27 | default: |
| 28 | *pendingG = false |
| 29 | return false |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func jumpListTop(list *tview.List) { |
| 34 | if list == nil || list.GetItemCount() == 0 { |
no outgoing calls
no test coverage detected