Skip to content

Commit

Permalink
Merge pull request #451 from noborus/fix-write-original
Browse files Browse the repository at this point in the history
Adjust start when using section-header
  • Loading branch information
noborus authored Oct 11, 2023
2 parents 10393ef + a0be5f2 commit 10d812e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oviewer/oviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ func (root *Root) WriteOriginal() {
m.bottomLN = m.BufEndNum()
}

start := max(0, m.topLN-root.BeforeWriteOriginal)
start := max(0, m.topLN-(m.sectionHeaderNum+root.BeforeWriteOriginal))
end := m.bottomLN - 1
if root.AfterWriteOriginal != 0 {
end = m.topLN + root.AfterWriteOriginal - 1
Expand Down

0 comments on commit 10d812e

Please sign in to comment.