|
|
|
@ -289,7 +289,8 @@ function! s:fzf_tmux(dict)
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! s:splittable(dict)
|
|
|
|
|
return s:present(a:dict, 'up', 'down', 'left', 'right')
|
|
|
|
|
return s:present(a:dict, 'up', 'down') && &lines > 15 ||
|
|
|
|
|
\ s:present(a:dict, 'left', 'right') && &columns > 40
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! s:pushd(dict)
|
|
|
|
@ -405,6 +406,11 @@ function! s:split(dict)
|
|
|
|
|
\ 'right': ['vertical botright', 'vertical resize', &columns] }
|
|
|
|
|
let ppos = s:getpos()
|
|
|
|
|
try
|
|
|
|
|
if s:present(a:dict, 'window')
|
|
|
|
|
execute a:dict.window
|
|
|
|
|
elseif !s:splittable(a:dict)
|
|
|
|
|
execute (tabpagenr()-1).'tabnew'
|
|
|
|
|
else
|
|
|
|
|
for [dir, triple] in items(directions)
|
|
|
|
|
let val = get(a:dict, dir, '')
|
|
|
|
|
if !empty(val)
|
|
|
|
@ -419,10 +425,6 @@ function! s:split(dict)
|
|
|
|
|
return [ppos, {}]
|
|
|
|
|
endif
|
|
|
|
|
endfor
|
|
|
|
|
if s:present(a:dict, 'window')
|
|
|
|
|
execute a:dict.window
|
|
|
|
|
else
|
|
|
|
|
execute (tabpagenr()-1).'tabnew'
|
|
|
|
|
endif
|
|
|
|
|
return [ppos, { '&l:wfw': &l:wfw, '&l:wfh': &l:wfh }]
|
|
|
|
|
finally
|
|
|
|
|