Skip to content

Commit

Permalink
Merge pull request #485 from jumpserver/dev
Browse files Browse the repository at this point in the history
fix: pre page action
  • Loading branch information
BaiJiangJie authored Nov 13, 2020
2 parents e054394 + d2f3c96 commit f6e2049
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/handler/select_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ func (u *UserSelectHandler) MovePrePage() () {
if u.HasPrev() {
offset := u.CurrentOffSet()
newPageSize := getPageSize(u.h.term)
u.currentResult = u.Retrieve(newPageSize, offset, u.searchKeys...)
start := offset - newPageSize*2
if start <= 0 {
start = 0
}
u.currentResult = u.Retrieve(newPageSize, start, u.searchKeys...)
}
u.DisplayCurrentResult()
}
Expand Down

0 comments on commit f6e2049

Please sign in to comment.