Skip to content

Commit f507f91

Browse files
committed
Fix bug with "set foldlevel-=search"
For "set foldlevel-=search" sneaking did not properly skip to the end of closed folds. Now it does. See pull request justinmk#152.
1 parent cb1125f commit f507f91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/sneak.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func! sneak#to(op, input, inputlen, count, repeatmotion, reverse, inclusive, str
160160
let l:winview = winsaveview()
161161
if !l:search_foldopen && foldclosed('.') > -1
162162
call cursor(a:reverse ? foldclosed('.') : foldclosedend('.'),
163-
\ a:reverse ? 1 : '$')
163+
\ a:reverse ? 1 : col('$'))
164164
endif
165165
let matchpos = s.dosearch()
166166
if 0 == max(matchpos) " if no search results found

0 commit comments

Comments
 (0)