mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 05:04:30 +08:00
Respect preview-window value in FZF_DEFAULT_OPTS
when g:fzf_preview_window is not set, instead of overriding it with `right`. Close #2378
This commit is contained in:
@@ -140,7 +140,7 @@ function! fzf#vim#with_preview(...)
|
|||||||
|
|
||||||
" g:fzf_preview_window
|
" g:fzf_preview_window
|
||||||
if empty(args)
|
if empty(args)
|
||||||
let preview_args = get(g:, 'fzf_preview_window', ['right', 'ctrl-/'])
|
let preview_args = get(g:, 'fzf_preview_window', ['', 'ctrl-/'])
|
||||||
if empty(preview_args)
|
if empty(preview_args)
|
||||||
let args = ['hidden']
|
let args = ['hidden']
|
||||||
else
|
else
|
||||||
@@ -150,7 +150,7 @@ function! fzf#vim#with_preview(...)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if len(args) && type(args[0]) == s:TYPE.string
|
if len(args) && type(args[0]) == s:TYPE.string
|
||||||
if args[0] !~# '^\(up\|down\|left\|right\|hidden\)'
|
if len(args[0]) && args[0] !~# '^\(up\|down\|left\|right\|hidden\)'
|
||||||
throw 'invalid preview window: '.args[0]
|
throw 'invalid preview window: '.args[0]
|
||||||
endif
|
endif
|
||||||
let window = args[0]
|
let window = args[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user