From 8a47a2bf5f5186fd1bdf76360978e89d7ba66aad Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 1 Oct 2015 03:46:49 +0900 Subject: [PATCH] Merge s:defs calls Avoid duplicate error messages on invalid g:fzf_command_prefix --- plugin/fzf.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 2f898a9..ca0dc2b 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -57,7 +57,8 @@ call s:defs([ \'command! -bang Helptags call fzf#vim#helptags(s:w(0))', \'command! -bang Windows call fzf#vim#windows(s:w(0))', \'command! -bang Commits call fzf#vim#commits(s:w(0))', -\'command! -bang BCommits call fzf#vim#buffer_commits(s:w(0))']) +\'command! -bang BCommits call fzf#vim#buffer_commits(s:w(0))', +\'command! -bang -nargs=* History call s:history(, 0)']) function! s:history(arg, bang) let bang = a:bang || a:arg[len(a:arg)-1] == '!' @@ -70,7 +71,6 @@ function! s:history(arg, bang) call fzf#vim#history(ext) endif endfunction -call s:defs(['command! -bang -nargs=* History call s:history(, 0)']) function! fzf#complete(...) return call('fzf#vim#complete', a:000)