mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 21:05:09 +00:00
[vim] Tilde prefix is not allowed for left
or right
layout
This commit is contained in:
parent
b86838c2b0
commit
f958c9daf5
@ -276,10 +276,10 @@ function! s:fzf_tmux(dict)
|
|||||||
if s:present(a:dict, o)
|
if s:present(a:dict, o)
|
||||||
let spec = a:dict[o]
|
let spec = a:dict[o]
|
||||||
if (o == 'up' || o == 'down') && spec[0] == '~'
|
if (o == 'up' || o == 'down') && spec[0] == '~'
|
||||||
let size = '-'.o[0].s:calc_size(&lines, spec[1:], a:dict)
|
let size = '-'.o[0].s:calc_size(&lines, spec, a:dict)
|
||||||
else
|
else
|
||||||
" Legacy boolean option
|
" Legacy boolean option
|
||||||
let size = '-'.o[0].(spec == 1 ? '' : spec)
|
let size = '-'.o[0].(spec == 1 ? '' : substitute(spec, '^\~', '', ''))
|
||||||
endif
|
endif
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
@ -375,10 +375,11 @@ function! s:execute_tmux(dict, command, temps) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:calc_size(max, val, dict)
|
function! s:calc_size(max, val, dict)
|
||||||
if a:val =~ '%$'
|
let val = substitute(a:val, '^\~', '', '')
|
||||||
let size = a:max * str2nr(a:val[:-2]) / 100
|
if val =~ '%$'
|
||||||
|
let size = a:max * str2nr(val[:-2]) / 100
|
||||||
else
|
else
|
||||||
let size = min([a:max, str2nr(a:val)])
|
let size = min([a:max, str2nr(val)])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let srcsz = -1
|
let srcsz = -1
|
||||||
@ -409,7 +410,7 @@ function! s:split(dict)
|
|||||||
if !empty(val)
|
if !empty(val)
|
||||||
let [cmd, resz, max] = triple
|
let [cmd, resz, max] = triple
|
||||||
if (dir == 'up' || dir == 'down') && val[0] == '~'
|
if (dir == 'up' || dir == 'down') && val[0] == '~'
|
||||||
let sz = s:calc_size(max, val[1:], a:dict)
|
let sz = s:calc_size(max, val, a:dict)
|
||||||
else
|
else
|
||||||
let sz = s:calc_size(max, val, {})
|
let sz = s:calc_size(max, val, {})
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user