Skip to content

Commit 1f8702b

Browse files
authored
fix dot-repeat for g@ #308
When repeating `g@` operator, `sneak#wrap()` uses information stored in `s:st.opfunc_st` instead of taking additional input.
1 parent 29ec916 commit 1f8702b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: plugin/sneak.vim

+5-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,11 @@ func! sneak#to(op, input, inputlen, count, register, repeatmotion, reverse, incl
252252

253253
if is_op && a:op !=# 'y'
254254
let change = a:op !=? "c" ? "" : "\<c-r>.\<esc>"
255-
let seq = a:op."\<Plug>SneakRepeat".sneak#util#strlen(a:input).a:reverse.a:inclusive.(2*!empty(target)).a:input.target.change
255+
let args = sneak#util#strlen(a:input) . a:reverse . a:inclusive . (2*!empty(target))
256+
if a:op !=# 'g@'
257+
let args .= a:input . target . change
258+
endif
259+
let seq = a:op . "\<Plug>SneakRepeat" . args
256260
silent! call repeat#setreg(seq, a:register)
257261
silent! call repeat#set(seq, a:count)
258262

0 commit comments

Comments
 (0)