From 7a75252211554c6bbf39f0d94e6ea6a409681301 Mon Sep 17 00:00:00 2001 From: Marius Bergmann Date: Tue, 12 Aug 2014 11:29:17 +0200 Subject: [PATCH] Strip out ^[[2K and ^[[0G in tmux output ^[[2K^[[0G means "clear line and move to the first column". They clutter up the output and should be stripped from it. --- autoload/dispatch/tmux.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/dispatch/tmux.vim b/autoload/dispatch/tmux.vim index dc3523dc..9d6dd5a3 100644 --- a/autoload/dispatch/tmux.vim +++ b/autoload/dispatch/tmux.vim @@ -58,7 +58,7 @@ function! dispatch#tmux#make(request) abort elseif uname ==# 'Linux' let filter .= ' -u' endif - let filter .= " -e \"s/\r$//\" -e \"s/.*\r//\" -e \"s/\e\\[K//g\" -e \"s/\e\\[[0-9;]*m//g\" > ".a:request.file + let filter .= " -e \"s/\r$//\" -e \"s/.*\r//\" -e \"s/\e\\[K//g\" -e \"s/.*\e\\[2K\e\\[0G//g\" -e \"s/\e\\[[0-9;]*m//g\" > ".a:request.file call system('tmux ' . cmd . '|tee ' . s:make_pane . \ (pipepane ? '|xargs -I {} tmux pipe-pane -t {} '.shellescape(filter) : ''))