1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 06:10:05 +08:00
SpaceVim/bundle/vim-grammarous/autoload/operator/grammarous.vim
2023-03-28 23:43:55 +08:00

12 lines
357 B
VimL

function! s:is_empty_region(begin, end)
return a:begin[1] > a:end[1] || (a:begin[1] == a:end[1] && a:end[2] < a:begin[2])
endfunction
function! operator#grammarous#do(visual_kind)
if s:is_empty_region(getpos("'["), getpos("']"))
return
endif
call grammarous#check_current_buffer('', [getpos("'[")[1], getpos("']")[1]])
endfunction