mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-01 12:42:01 -07:00
[vim] Pick up fzf-tmux on $PATH when bin/fzf-tmux is not found
Close #1874
This commit is contained in:
@@ -164,7 +164,7 @@ function! s:fzf_exec()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:tmux_enabled()
|
function! s:tmux_enabled()
|
||||||
if has('gui_running')
|
if has('gui_running') || !exists('$TMUX')
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -173,10 +173,16 @@ function! s:tmux_enabled()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let s:tmux = 0
|
let s:tmux = 0
|
||||||
if exists('$TMUX') && executable(s:fzf_tmux)
|
if !executable(s:fzf_tmux)
|
||||||
let output = system('tmux -V')
|
if executable('fzf-tmux')
|
||||||
let s:tmux = !v:shell_error && output >= 'tmux 1.7'
|
let s:fzf_tmux = 'fzf-tmux'
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let output = system('tmux -V')
|
||||||
|
let s:tmux = !v:shell_error && output >= 'tmux 1.7'
|
||||||
return s:tmux
|
return s:tmux
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user