Skip to content

Commit c3558f8

Browse files
committed
fix justinmk#141: <Plug>SneakStreak should force streak-mode
1 parent 0f03307 commit c3558f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

plugin/sneak.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func! sneak#to(op, input, inputlen, count, repeatmotion, reverse, inclusive, str
203203
endif
204204

205205
"enter streak-mode iff there are >=2 _additional_ on-screen matches.
206-
let target = (2 == a:streak || (a:streak && g:sneak#opt.streak)) && !max(bounds) && s.hasmatches(2)
206+
let target = (2 == a:streak || (a:streak && g:sneak#opt.streak && s.hasmatches(2))) && !max(bounds)
207207
\ ? sneak#streak#to(s, is_v, a:reverse): ""
208208

209209
if !is_op

tests/test.vader

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# vim -N -u NONE -c "set rtp+=~/.vim/bundle/vim-sneak,~/.vim/bundle/vader.vim,~/.vim/bundle/vim-repeat" -c "runtime! plugin/sneak.vim plugin/vader.vim plugin/repeat.vim" -c "Vader ~/.vim/bundle/vim-sneak/tests/test.vader"
2+
# vim -N -u NONE -c 'set rtp+=~/.vim/bundle/vim-sneak,~/.vim/bundle/vader.vim,~/.vim/bundle/vim-repeat' -c 'runtime! plugin/sneak.vim plugin/vader.vim plugin/repeat.vim' -c 'Vader ~/.vim/bundle/vim-sneak/tests/test.vader'
23
#
34
# BUG: highlight targets are bogus if &iminsert=1
45
# BUG: sneak cannot find ёе: in this text

0 commit comments

Comments
 (0)