From 7a98feb253a7e8a23c8658894873851a96053e8f Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 4 Dec 2012 20:16:41 -0500 Subject: [PATCH] Try to remove comments in cq This will break on strings with semicolons in them. --- plugin/foreplay.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/foreplay.vim b/plugin/foreplay.vim index c8a89a8..59a1e82 100644 --- a/plugin/foreplay.vim +++ b/plugin/foreplay.vim @@ -433,7 +433,7 @@ endfunction function! s:editop(type) abort call feedkeys(&cedit . "\", '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)