diff --git a/plugin/vimux.vim b/plugin/vimux.vim index 51fcbf5..3f72ac1 100644 --- a/plugin/vimux.vim +++ b/plugin/vimux.vim @@ -197,7 +197,11 @@ function! VimuxTmux(arguments) abort echom l:tmuxCommand endif if has_key(environ(), 'TMUX') - return system(l:tmuxCommand) + let l:output = system(l:tmuxCommand) + if v:shell_error + throw 'Tmux command failed with message:' . l:output + endif + return l:output else throw 'Aborting, because not inside tmux session.' endif