mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-24 12:02:00 +08:00
[[B]Commits] Use delta if available
This commit is contained in:
@@ -1221,8 +1221,9 @@ function! s:commits(buffer_local, args)
|
||||
endif
|
||||
|
||||
if !s:is_win && &columns > s:wide
|
||||
let suffix = executable('delta') ? '| delta' : '--color=always'
|
||||
call extend(options.options,
|
||||
\ ['--preview', 'echo {} | grep -o "[a-f0-9]\{7,\}" | head -1 | xargs git show --format=format: --color=always | head -1000'])
|
||||
\ ['--preview', 'echo {} | grep -o "[a-f0-9]\{7,\}" | head -1 | xargs git show --format=format: ' . suffix])
|
||||
endif
|
||||
|
||||
return s:fzf(a:buffer_local ? 'bcommits' : 'commits', options, a:args)
|
||||
|
||||
Reference in New Issue
Block a user