You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vim.api.nvim_create_augroup('LeapRemote', {})
vim.api.nvim_create_autocmd('User', {
pattern = 'RemoteOperationDone',
group = 'LeapRemote',
callback = function (event)
-- Do not paste if some special register was in use.
if vim.v.operator == 'y' and event.data.register == '"' then
vim.cmd('normal! p')
end
end,
})
fails to paste if I yanked using some custom text object, for example indent object defined by michaeljsmith/vim-indent-object or some objects from targets.vim ((, [, b objects which are redefined by targets.vim I think - only happens with targets.vim enabled). It happens even if I remove this if statement and always try to paste.
I isolated that this happens due to this line, concretely ((mode0 == "v") or (mode0 == "V") or (mode0 == "\22")) and (key == mode0) in the case of target.vim, and (key == vim.keycode("<esc>")) in the case of vim-indent-object, marking that the operation was cancelled, while it wasn't.
For vim-indent-object I can see why it happens, it defines things like vnoremap <silent>ii :<C-u>cal <Sid>HandleTextObjectMapping(1, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])<CR><Esc>gv.
For now I just disabled locally this cancellation line and I'm satisfied with that.
The text was updated successfully, but these errors were encountered:
The snippet from readme:
fails to paste if I yanked using some custom text object, for example indent object defined by
michaeljsmith/vim-indent-object
or some objects fromtargets.vim
((
,[
,b
objects which are redefined by targets.vim I think - only happens with targets.vim enabled). It happens even if I remove this if statement and always try to paste.I isolated that this happens due to this line, concretely
((mode0 == "v") or (mode0 == "V") or (mode0 == "\22")) and (key == mode0)
in the case of target.vim, and(key == vim.keycode("<esc>"))
in the case of vim-indent-object, marking that the operation was cancelled, while it wasn't.For vim-indent-object I can see why it happens, it defines things like
vnoremap <silent>ii :<C-u>cal <Sid>HandleTextObjectMapping(1, 0, 1, [line("'<"), line("'>"), col("'<"), col("'>")])<CR><Esc>gv
.For now I just disabled locally this cancellation line and I'm satisfied with that.
The text was updated successfully, but these errors were encountered: