Skip to content

Commit

Permalink
Merge pull request #222 from preservim/check-system-returns
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque authored Jun 3, 2024
2 parents 5738a47 + 879cb5c commit fa35410
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions doc/vimux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -469,5 +469,16 @@ runner is created instead, positioned according to `VimuxOrientation`.
<
Default: {}

------------------------------------------------------------------------------
*VimuxDebug*
4.13 g:VimuxDebug~

If you're having trouble with vimux, set this option to get vimux to pass each
tmux command to |echomsg| before running it.
>
let g:VimuxDebug = v:true
<
Default: v:false

==============================================================================
vim:tw=78:ts=2:sw=2:expandtab:ft=help:norl:
9 changes: 7 additions & 2 deletions plugin/vimux.vim
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,16 @@ function! VimuxPromptCommand(...) abort
endfunction

function! VimuxTmux(arguments) abort
let l:tmuxCommand = VimuxOption('VimuxTmuxCommand').' '.a:arguments
if VimuxOption('VimuxDebug')
echom VimuxOption('VimuxTmuxCommand').' '.a:arguments
echom l:tmuxCommand
endif
if has_key(environ(), 'TMUX')
return system(VimuxOption('VimuxTmuxCommand').' '.a:arguments)
let l:output = system(l:tmuxCommand)
if v:shell_error
throw 'Tmux command failed with message:' . l:output
endif

This comment has been minimized.

Copy link
@tscolari

tscolari Aug 19, 2024

Contributor

This seems to have caused a regression -> #229
Commenting out the error check makes the old behaviour work:

  1. closing a pane will not stop vimux from opening it again when vim.g['test#preserve_screen'] = 0 is set.
return l:output
else
throw 'Aborting, because not inside tmux session.'
endif
Expand Down

0 comments on commit fa35410

Please sign in to comment.