Skip to content

Commit 7f15726

Browse files
authored
Merge pull request #155 from lyuts/check_tmux_binary
2 parents 46377b8 + 9c05307 commit 7f15726

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

plugin/vimux.vim

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ if exists("g:loaded_vimux") || &cp
33
endif
44
let g:loaded_vimux = 1
55

6+
function! _VimuxTmuxCmd()
7+
return _VimuxOption("g:VimuxTmuxCommand", "tmux")
8+
endfunction
9+
10+
if !executable(_VimuxTmuxCmd())
11+
echohl ErrorMsg | echomsg "Failed to find executable "._VimuxTmuxCmd() | echohl None
12+
finish
13+
endif
14+
615
command -nargs=* VimuxRunCommand :call VimuxRunCommand(<args>)
716
command VimuxRunLastCommand :call VimuxRunLastCommand()
817
command VimuxCloseRunner :call VimuxCloseRunner()
@@ -146,8 +155,7 @@ function! VimuxPromptCommand(...)
146155
endfunction
147156

148157
function! _VimuxTmux(arguments)
149-
let l:command = _VimuxOption("g:VimuxTmuxCommand", "tmux")
150-
return system(l:command." ".a:arguments)
158+
return system(_VimuxTmuxCmd()." ".a:arguments)
151159
endfunction
152160

153161
function! _VimuxTmuxSession()

0 commit comments

Comments
 (0)