Check for empty $TMUX variable

In some situations, like when running vim with sudo, $TMUX exists() for some reason but is empty.
This commit is contained in:
Markus Koller 2014-12-04 21:59:11 +01:00
parent 6a84dd326d
commit 1c08bafec6

View File

@ -9,7 +9,7 @@
" Docs on mapping fast escape codes in vim " Docs on mapping fast escape codes in vim
" http://vim.wikia.com/wiki/Mapping_fast_keycodes_in_terminal_Vim " http://vim.wikia.com/wiki/Mapping_fast_keycodes_in_terminal_Vim
function! WrapForTmux(s) function! WrapForTmux(s)
if !exists('$TMUX') if empty('$TMUX')
return a:s return a:s
endif endif