Skip folded lines

This commit is contained in:
Kim Silkebækken 2011-03-28 00:22:40 +02:00
parent 386eb49f23
commit 2ccfe05430

View File

@ -291,10 +291,16 @@
let pos = searchpos(a:regexp, search_direction, search_stopline) let pos = searchpos(a:regexp, search_direction, search_stopline)
" Reached end of search range
if pos == [0, 0] if pos == [0, 0]
break break
endif endif
" Skip folded lines
if foldclosed(pos[0]) != -1
continue
endif
call add(targets, pos) call add(targets, pos)
endwhile endwhile