MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / handleVimTopBottomRune

Function handleVimTopBottomRune

internal/ui/components/vim_nav.go:8–31  ·  view source on GitHub ↗
(event *tcell.EventKey, pendingG *bool, jumpTop func(), jumpBottom func())

Source from the content-addressed store, hash-verified

6)
7
8func 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
33func jumpListTop(list *tview.List) {
34 if list == nil || list.GetItemCount() == 0 {

Callers 4

setupKeyHandlersMethod · 0.85
SetAppMethod · 0.85
SetAppMethod · 0.85
SetAppMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected