Skip to content

Commit

Permalink
Fix bug with "set foldlevel-=search"
Browse files Browse the repository at this point in the history
For "set foldlevel-=search" sneaking did not properly skip to the end of
closed folds. Now it does. See pull request justinmk#152.
  • Loading branch information
milsen committed Aug 4, 2015
1 parent cb1125f commit f507f91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/sneak.vim
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func! sneak#to(op, input, inputlen, count, repeatmotion, reverse, inclusive, str
let l:winview = winsaveview()
if !l:search_foldopen && foldclosed('.') > -1
call cursor(a:reverse ? foldclosed('.') : foldclosedend('.'),
\ a:reverse ? 1 : '$')
\ a:reverse ? 1 : col('$'))
endif
let matchpos = s.dosearch()
if 0 == max(matchpos) " if no search results found
Expand Down

0 comments on commit f507f91

Please sign in to comment.