Skip to content

Commit

Permalink
fix args validation for status source.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrsh7th committed Jul 16, 2012
1 parent e8a98d4 commit 64d7838
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autoload/unite/sources/vcs_log.vim
Expand Up @@ -23,10 +23,10 @@ function! s:source.gather_candidates(args, context)
endif

let root = vcs#vcs('root', [path])
let logs = vcs#vcs('log', [path])
call unite#print_message('[vcs/log] root: ' . root)
call unite#print_message('[vcs/log] target: ' . path[strlen(root) + 1:-1])

let logs = vcs#vcs('log', [path])
let revisionlen = max(map(copy(logs), "strlen(v:val.revision)"))
let authorlen = max(map(copy(logs), "strlen(split(v:val.author, ' ')[0])"))
return map(logs, "{
Expand Down
2 changes: 1 addition & 1 deletion autoload/unite/sources/vcs_status.vim
Expand Up @@ -12,7 +12,7 @@ let s:source = {

function! s:source.gather_candidates(args, context)
if !a:context.is_redraw
let path = vcs#target(a:args)
let path = len(a:args) > 0 ? vcs#target(a:args) : vcs#vcs('root', a:args)
if vcs#detect(path) == ''
call unite#print_message('[vcs/status] vcs not detected: ' . path)
return []
Expand Down

0 comments on commit 64d7838

Please sign in to comment.