aboutsummaryrefslogtreecommitdiffstats
path: root/termui/bug_table.go
diff options
context:
space:
mode:
Diffstat (limited to 'termui/bug_table.go')
-rw-r--r--termui/bug_table.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/termui/bug_table.go b/termui/bug_table.go
index cb3f6964..36ce7525 100644
--- a/termui/bug_table.go
+++ b/termui/bug_table.go
@@ -391,6 +391,8 @@ func (bt *bugTable) nextPage(g *gocui.Gui, v *gocui.View) error {
}
bt.pageCursor += max
+ bt.selectCursor = 0
+ _ = v.SetCursor(0, bt.selectCursor)
return bt.doPaginate(max)
}
@@ -398,7 +400,12 @@ func (bt *bugTable) nextPage(g *gocui.Gui, v *gocui.View) error {
func (bt *bugTable) previousPage(g *gocui.Gui, v *gocui.View) error {
_, max := v.Size()
+ if bt.pageCursor == 0 {
+ return nil
+ }
bt.pageCursor = maxInt(0, bt.pageCursor-max)
+ bt.selectCursor = max - 1
+ _ = v.SetCursor(0, bt.selectCursor)
return bt.doPaginate(max)
}