summaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim
index b26a5455..2594bc41 100644
--- a/plugin/fzf.vim
+++ b/plugin/fzf.vim
@@ -864,9 +864,9 @@ function! s:popup(opts) abort
let ambidouble = &ambiwidth == 'double' ? 2 : 1
" Size and position
- let width = min([max([0, float2nr(&columns * a:opts.width)]), &columns])
+ let width = min([max([8, a:opts.width > 1 ? a:opts.width : float2nr(&columns * a:opts.width)]), &columns])
let width += width % ambidouble
- let height = min([max([0, float2nr(&lines * a:opts.height)]), &lines - has('nvim')])
+ let height = min([max([4, a:opts.height > 1 ? a:opts.height : float2nr(&lines * a:opts.height)]), &lines - has('nvim')])
let row = float2nr(get(a:opts, 'yoffset', 0.5) * (&lines - height))
let col = float2nr(get(a:opts, 'xoffset', 0.5) * (&columns - width))