Try to remove comments in cq

This will break on strings with semicolons in them.
This commit is contained in:
Tim Pope 2012-12-04 20:16:41 -05:00
parent a5d60016a2
commit 7a98feb253
1 changed files with 1 additions and 1 deletions

View File

@ -433,7 +433,7 @@ endfunction
function! s:editop(type) abort
call feedkeys(&cedit . "\<Home>", 'n')
let input = s:input(substitute(s:opfunc(a:type), '\n\s*', ' ', 'g'))
let input = s:input(substitute(substitute(s:opfunc(a:type), "\s*;[^\n]*", '', 'g'), '\n\+\s*', ' ', 'g'))
try
if input !=# ''
echo foreplay#eval(input)