Skip to content

Commit

Permalink
Re-enable auto-scrolling with the G key too
Browse files Browse the repository at this point in the history
A suggestion from @kevinhwang91 to make this action more friendly to vim
users.
  • Loading branch information
gcla committed Sep 29, 2020
1 parent 7e07a52 commit 796f4cf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1954,9 +1954,17 @@ func updatePacketListWithData(psml psmlInfo, app gowid.IApp) {

// don't claim the keypress
func ApplyAutoScroll(ev *tcell.EventKey, app gowid.IApp) bool {
doit := false
reenableAutoScroll = false
switch ev.Key() {
case tcell.KeyRune:
if ev.Rune() == 'G' {
doit = true
}
case tcell.KeyEnd:
doit = true
}
if doit {
if termshark.ConfBool("main.auto-scroll", true) {
AutoScroll = true
reenableAutoScroll = true // when packet updates come, helps
Expand Down

0 comments on commit 796f4cf

Please sign in to comment.