From 1f206db9657969b3ff31d27feffd5394df8f20c6 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 14 Sep 2016 14:09:16 -0400 Subject: [PATCH] Fixing E684 when VisualHostKey is enabled for ssh Having VisualHostKey enabled for ssh can cause lines containing a single "^M" character to appear in the git output, which causes E684 to be thrown if not filtered out. --- plug.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 1dee361..aee4722 100644 --- a/plug.vim +++ b/plug.vim @@ -1089,7 +1089,7 @@ function! s:job_handler(job_id, data, event) abort if a:event == 'stdout' let complete = empty(a:data[-1]) - let lines = map(filter(a:data, 'len(v:val) > 0'), 'split(v:val, "[\r\n]")[-1]') + let lines = map(filter(a:data, 'v:val =~ "[^\r\n]"'), 'split(v:val, "[\r\n]")[-1]') call extend(self.lines, lines) let self.result = join(self.lines, "\n") if !complete