Skip to content

Commit

Permalink
Merge pull request #674 from noborus/conditions-sync
Browse files Browse the repository at this point in the history
Add conditions for requestLoadSync
  • Loading branch information
noborus authored Dec 28, 2024
2 parents 0af2c9d + ec7316e commit cc895e4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions oviewer/move_vertical.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ func (m *Document) moveBottom() {

lN := m.BufEndNum() - 1
height := m.height - lastLineMargin
chunkNum, _ := chunkLineNum(lN - height)
m.requestLoadSync(chunkNum)
if m.BufEOF() {
if chunkNum, _ := chunkLineNum(lN - height); chunkNum > 0 {
m.requestLoadSync(chunkNum)
}
}
m.topLX, m.topLN = m.bottomLineNum(lN, height)
}

Expand Down

0 comments on commit cc895e4

Please sign in to comment.