From 80186534dc3a1e782c1bffee91cc5285350fbedc Mon Sep 17 00:00:00 2001 From: Shy Date: Sat, 8 Apr 2017 16:26:01 +0200 Subject: [PATCH] Added support for ranges --- c4ctrl.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/c4ctrl.vim b/c4ctrl.vim index c094c88..fe0ea8c 100644 --- a/c4ctrl.vim +++ b/c4ctrl.vim @@ -38,7 +38,7 @@ function s:FindConfigDir() endfunction -function C4ctrl(command, ...) +function C4ctrl(command, ...) range " ********************************************************************* " " Make some functionality of the 'c4ctrl' command line script available " " from within Vim. " @@ -134,7 +134,8 @@ function C4ctrl(command, ...) endif endfor - silent let s:ret = system(s:command_line, bufnr("%")) + "silent let s:ret = system(s:command_line, bufnr("%")) + silent let s:ret = system(s:command_line, getline(a:firstline, a:lastline)) unlet! s:arg s:i s:command_line s:txt @@ -289,6 +290,6 @@ if !exists(":C4ctrl") " ********************** " " Add our command to Vim " " ********************** " - command -nargs=+ -complete=custom,s:C4ctrlCompletion C4ctrl call C4ctrl() + command -nargs=+ -complete=custom,s:C4ctrlCompletion -range=% C4ctrl call C4ctrl() endif