Skip to content

Commit

Permalink
fix dot-repeat for g@ #308
Browse files Browse the repository at this point in the history
When repeating `g@` operator, `sneak#wrap()` uses information stored in
`s:st.opfunc_st` instead of taking additional input.
  • Loading branch information
tomtomjhj authored Feb 16, 2024
1 parent 29ec916 commit 1f8702b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/sneak.vim
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ func! sneak#to(op, input, inputlen, count, register, repeatmotion, reverse, incl

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

Expand Down

0 comments on commit 1f8702b

Please sign in to comment.