This commit is contained in:
Alex Yatskov 2015-08-19 17:34:01 +09:00
parent 10bc15d418
commit 9bba261e53

View File

@ -106,15 +106,17 @@ func (v *vimDoc) buildHelpTag(text []byte) []byte {
func (v *vimDoc) buildChapters(h *heading) []byte { func (v *vimDoc) buildChapters(h *heading) []byte {
index := -1 index := -1
for i, curr := range v.headings { {
if curr == h { for i, curr := range v.headings {
index = i if curr == h {
break index = i
break
}
} }
}
if index < 0 { if index < 0 {
log.Fatal("heading not found") log.Fatal("heading not found")
}
} }
var chapters []int var chapters []int