diff --git a/plug.vim b/plug.vim index 91b4072..78fdc03 100644 --- a/plug.vim +++ b/plug.vim @@ -1338,9 +1338,10 @@ function! s:bar() endfunction function! s:logpos(name) - for i in range(4, line('$')) + let max = line('$') + for i in range(4, max > 4 ? max : 4) if getline(i) =~# '^[-+x*] '.a:name.':' - for j in range(i + 1, line('$')) + for j in range(i + 1, max > 5 ? max : 5) if getline(j) !~ '^ ' return [i, j - 1] endif