1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 13:10:05 +08:00
SpaceVim/bundle/vim-grammarous/autoload/operator/grammarous.vim

12 lines
357 B
VimL
Raw Normal View History

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