Enha: scroll helppage with jk
This commit is contained in:
@@ -403,7 +403,7 @@ func updateFlexLayout() {
|
|||||||
flex.AddItem(textView, 0, 40, false)
|
flex.AddItem(textView, 0, 40, false)
|
||||||
flex.AddItem(textArea, 0, 10, false)
|
flex.AddItem(textArea, 0, 10, false)
|
||||||
if positionVisible {
|
if positionVisible {
|
||||||
flex.AddItem(statusLineWidget, 0, 2, false)
|
flex.AddItem(statusLineWidget, 0, 4, false)
|
||||||
}
|
}
|
||||||
// Keep focus on currently focused widget
|
// Keep focus on currently focused widget
|
||||||
focused := app.GetFocus()
|
focused := app.GetFocus()
|
||||||
|
|||||||
13
tui.go
13
tui.go
@@ -483,6 +483,19 @@ func init() {
|
|||||||
pages.RemovePage(helpPage)
|
pages.RemovePage(helpPage)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// Allow scrolling keys to pass through to the TextView
|
||||||
|
switch event.Key() {
|
||||||
|
case tcell.KeyUp, tcell.KeyDown,
|
||||||
|
tcell.KeyPgUp, tcell.KeyPgDn,
|
||||||
|
tcell.KeyHome, tcell.KeyEnd:
|
||||||
|
return event
|
||||||
|
}
|
||||||
|
if event.Key() == tcell.KeyRune {
|
||||||
|
switch event.Rune() {
|
||||||
|
case 'j', 'k', 'g', 'G':
|
||||||
|
return event
|
||||||
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user