mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-05 22:52:06 -07:00
No need to "tmux list-panes" when obviously not on tmux (#303)
This commit is contained in:
@@ -54,14 +54,17 @@ function! s:fzf_exec()
|
|||||||
return s:exec
|
return s:exec
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:tmux_not_zoomed()
|
||||||
|
return system('tmux list-panes -F "#F"') !~# 'Z'
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:tmux_enabled()
|
function! s:tmux_enabled()
|
||||||
if has('gui_running')
|
if has('gui_running')
|
||||||
return 0
|
return 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let not_zoomed = system('tmux list-panes -F "#F"') !~# 'Z'
|
|
||||||
if exists('s:tmux')
|
if exists('s:tmux')
|
||||||
return s:tmux && not_zoomed
|
return s:tmux && s:tmux_not_zoomed()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:tmux = 0
|
let s:tmux = 0
|
||||||
@@ -69,7 +72,7 @@ function! s:tmux_enabled()
|
|||||||
let output = system('tmux -V')
|
let output = system('tmux -V')
|
||||||
let s:tmux = !v:shell_error && output >= 'tmux 1.7'
|
let s:tmux = !v:shell_error && output >= 'tmux 1.7'
|
||||||
endif
|
endif
|
||||||
return s:tmux && not_zoomed
|
return s:tmux && s:tmux_not_zoomed()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:shellesc(arg)
|
function! s:shellesc(arg)
|
||||||
|
Reference in New Issue
Block a user