Skip to content

Commit

Permalink
Merge pull request #469 from noborus/improve-up
Browse files Browse the repository at this point in the history
Improved display when moving the first row up
  • Loading branch information
noborus authored Dec 29, 2023
2 parents 008a8d5 + d83a736 commit e415836
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion oviewer/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (root *Root) drawSectionHeader(lN int) int {

pn := lN
// prevSection searches for the section above the specified line.
if pn == 0 {
if m.startTopFlag && pn <= 0 {
pn = 1
}
sectionLN, err := m.prevSection(pn)
Expand Down
1 change: 1 addition & 0 deletions oviewer/move.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ func (root *Root) moveTop() {
root.resetSelect()
defer root.releaseEventBuffer()

root.Doc.startTopFlag = true
root.Doc.moveTop()
}

Expand Down
1 change: 0 additions & 1 deletion oviewer/move_vertical.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func (m *Document) moveLine(lN int) int {

// moveTop moves to the top.
func (m *Document) moveTop() {
m.startTopFlag = true
m.moveLine(m.BufStartNum())
}

Expand Down

0 comments on commit e415836

Please sign in to comment.