(rows, matches, current, words_wide)
| 51 | |
| 52 | |
| 53 | def paginate(rows, matches, current, words_wide): |
| 54 | if current not in matches: |
| 55 | current = matches[0] |
| 56 | per_page = rows * words_wide |
| 57 | current_page = matches.index(current) // per_page |
| 58 | return matches[per_page * current_page : per_page * (current_page + 1)] |
| 59 | |
| 60 | |
| 61 | def matches_lines(rows, columns, matches, current, config, match_format): |