File tree 3 files changed +2
-2
lines changed
3 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ func (root *Root) drawSectionHeader(lN int) int {
121
121
122
122
pn := lN
123
123
// prevSection searches for the section above the specified line.
124
- if pn = = 0 {
124
+ if m . startTopFlag && pn < = 0 {
125
125
pn = 1
126
126
}
127
127
sectionLN , err := m .prevSection (pn )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ func (root *Root) moveTop() {
10
10
root .resetSelect ()
11
11
defer root .releaseEventBuffer ()
12
12
13
+ root .Doc .startTopFlag = true
13
14
root .Doc .moveTop ()
14
15
}
15
16
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ func (m *Document) moveLine(lN int) int {
25
25
26
26
// moveTop moves to the top.
27
27
func (m * Document ) moveTop () {
28
- m .startTopFlag = true
29
28
m .moveLine (m .BufStartNum ())
30
29
}
31
30
You can’t perform that action at this time.
0 commit comments