From 1c08bafec6dcf4a2bf306c26cf2a1b0044c01dda Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Thu, 4 Dec 2014 21:59:11 +0100 Subject: [PATCH] Check for empty $TMUX variable In some situations, like when running vim with sudo, $TMUX exists() for some reason but is empty. --- plugin/bracketed-paste.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/bracketed-paste.vim b/plugin/bracketed-paste.vim index bb4f0cd..733a2e1 100644 --- a/plugin/bracketed-paste.vim +++ b/plugin/bracketed-paste.vim @@ -9,7 +9,7 @@ " Docs on mapping fast escape codes in vim " http://vim.wikia.com/wiki/Mapping_fast_keycodes_in_terminal_Vim function! WrapForTmux(s) - if !exists('$TMUX') + if empty('$TMUX') return a:s endif