mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-25 04:16:51 +08:00
Add preview.sh for ruby-less previews. (#259)
This commit is contained in:
@@ -29,7 +29,8 @@ set cpo&vim
|
||||
" ------------------------------------------------------------------
|
||||
|
||||
let s:layout_keys = ['window', 'up', 'down', 'left', 'right']
|
||||
let s:bin = { 'preview': expand('<sfile>:h:h:h').'/bin/preview.rb' }
|
||||
let s:which_bin = executable('ruby') ? '/bin/preview.rb' : '/bin/preview.sh'
|
||||
let s:bin = { 'preview': expand('<sfile>:h:h:h') . s:which_bin }
|
||||
let s:TYPE = {'dict': type({}), 'funcref': type(function('call')), 'string': type('')}
|
||||
|
||||
" [[options to wrap], preview window expression, [toggle-preview keys...]]
|
||||
@@ -55,10 +56,6 @@ function! fzf#vim#with_preview(...)
|
||||
call remove(args, 0)
|
||||
endif
|
||||
|
||||
if !executable('ruby')
|
||||
return options
|
||||
endif
|
||||
|
||||
let preview = printf(' --preview-window %s --preview "%s"\ %s\ {}',
|
||||
\ window,
|
||||
\ shellescape(s:bin.preview), window =~ 'up\|down' ? '-v' : '')
|
||||
|
||||
Reference in New Issue
Block a user