Currently, the map is simply omap <Plug>(operator-xxx) g@. It doesn't check that the pending operation is the same as <Plug>(operator-xxx). Can we change it to the following?
omap <expr> (v:operator == "g@" && &opfunc == function_name) ? "g@" : "\<esc>"
To do it, the last line of function operator#user#_define should be changed to
execute printf('onoremap <expr> %s (v:operator == "g@" && &opfunc == "%s")? "g@" : "\<esc>"',
\ a:operator_keyseq, a:function_name)
Currently, the map is simply
omap <Plug>(operator-xxx) g@. It doesn't check that the pending operation is the same as<Plug>(operator-xxx). Can we change it to the following?omap <expr> (v:operator == "g@" && &opfunc == function_name) ? "g@" : "\<esc>"To do it, the last line of function
operator#user#_defineshould be changed to