From 7e92b73d03cd008e248ad261208475b45bc2f128 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 2 Jan 2018 04:28:17 -0500 Subject: [PATCH] [fzf#vim#with_preview] workaround system() newline (#557) system() adds an extra newline which breaks the DOS shortname hack for Neovim on Windows. Suppress echo so the DOS shortname is the 1st line of the output Related: https://github.com/neovim/neovim/issues/7788 --- autoload/fzf/vim.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index dbdaa45..11eccca 100644 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -37,7 +37,7 @@ let s:bin = { let s:TYPE = {'dict': type({}), 'funcref': type(function('call')), 'string': type(''), 'list': type([])} if s:is_win if has('nvim') - let s:bin.preview = split(system('for %A in ("'.s:bin.preview.'") do echo %~sA'), "\n")[1] + let s:bin.preview = split(system('for %A in ("'.s:bin.preview.'") do @echo %~sA'), "\n")[0] else let s:bin.preview = fnamemodify(s:bin.preview, ':8') endif