mirror of
https://github.com/chenasraf/vim-matchup.git
synced 2026-05-18 01:38:57 +00:00
Fix operator regression caused by 75191c6
This commit is contained in:
@@ -199,6 +199,16 @@ function! s:motion_init_module() " {{{1
|
||||
call matchup#perf#toc('loading_module', 'motion')
|
||||
endfunction
|
||||
|
||||
" TODO redo this
|
||||
function! s:snr()
|
||||
return str2nr(matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_snr$'))
|
||||
endfunction
|
||||
let s:sid = printf("\<SNR>%d_", s:snr())
|
||||
|
||||
function! matchup#motion_sid()
|
||||
return s:sid
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
function! s:text_obj_init_module() " {{{1
|
||||
if !g:matchup_text_obj_enabled | return | endif
|
||||
|
||||
@@ -7,15 +7,12 @@
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! s:snr()
|
||||
return str2nr(matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_snr$'))
|
||||
endfunction
|
||||
let s:sid = printf("\<SNR>%d_", s:snr())
|
||||
|
||||
" TODO redo this
|
||||
function! matchup#motion#op(motion)
|
||||
let l:sid = matchup#motion_sid()
|
||||
let s:v_operator = v:operator
|
||||
execute 'normal' s:sid.'(wise)' . (v:count > 0 ? v:count : '')
|
||||
\ . s:sid.'(matchup-'.a:motion.')'
|
||||
execute 'normal' l:sid.'(wise)' . (v:count > 0 ? v:count : '')
|
||||
\ . l:sid.'(matchup-'.a:motion.')'
|
||||
unlet s:v_operator
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user