TDKCandidates // Fix a bug with single-page matrix pools.

This commit is contained in:
ShikiSuen 2023-11-26 17:18:13 +08:00
parent 787bbd5c0f
commit 40d866714e
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ public extension CandidatePool {
guard !candidatesShown.filter(\.isHighlighted).isEmpty else { return } guard !candidatesShown.filter(\.isHighlighted).isEmpty else { return }
isExpanded = true isExpanded = true
if candidateLines.count <= _maxLinesPerPage { if candidateLines.count <= _maxLinesPerPage {
recordedLineRangeForCurrentPage = max(0, currentLineNumber - _maxLinesPerPage + 1) ..< currentLineNumber + 1 recordedLineRangeForCurrentPage = lineRangeForFirstPage
} else { } else {
switch isBackward { switch isBackward {
case true: case true: