From b4d477586521429be1effd6b0ddd80831493a5ef Mon Sep 17 00:00:00 2001 From: Kiyoshi '13k' Murata Date: Mon, 21 May 2018 14:03:53 -0300 Subject: [PATCH 1/2] Fix text sent as input to rufo --- autoload/rufo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/rufo.vim b/autoload/rufo.vim index b800d96..a1152c9 100644 --- a/autoload/rufo.vim +++ b/autoload/rufo.vim @@ -61,7 +61,7 @@ function! s:format(start_line, end_line) abort silent exec l:buffer_number . 'bdelete' endif - let l:selection = join(map(getline(a:start_line, a:end_line), "escape(v:val, '\\')"), '\n') + let l:selection = join(map(getline(a:start_line, a:end_line), "escape(v:val, '\\')"), "\n") let l:out = systemlist('echo ' . shellescape(l:selection) . '| rufo') return [s:formatting_failed(l:out), l:out] endf From 6f23f2fe0c732bd785d373af53134b16226d910a Mon Sep 17 00:00:00 2001 From: Kiyoshi '13k' Murata Date: Mon, 21 May 2018 15:08:26 -0300 Subject: [PATCH 2/2] Remove backslash escaping --- autoload/rufo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/rufo.vim b/autoload/rufo.vim index a1152c9..b45ffcf 100644 --- a/autoload/rufo.vim +++ b/autoload/rufo.vim @@ -61,7 +61,7 @@ function! s:format(start_line, end_line) abort silent exec l:buffer_number . 'bdelete' endif - let l:selection = join(map(getline(a:start_line, a:end_line), "escape(v:val, '\\')"), "\n") + let l:selection = join(getline(a:start_line, a:end_line), "\n") let l:out = systemlist('echo ' . shellescape(l:selection) . '| rufo') return [s:formatting_failed(l:out), l:out] endf