Skip to content

Commit

Permalink
Use a dictionary instead of many small variables
Browse files Browse the repository at this point in the history
  • Loading branch information
somini committed Aug 18, 2020
1 parent 389cbe7 commit e4a0109
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plugin/gv.vim
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,10 @@ function! s:list(fugitive_repo, log_opts)
let git_log_cmd = call(a:fugitive_repo.git_command, git_args, a:fugitive_repo)

let repo_short_name = fnamemodify(a:fugitive_repo.tree(), ':t')
let b:gv_opts = a:log_opts
let b:gv_repo_short_name = repo_short_name
let b:gv = {
\ 'opts': a:log_opts,
\ 'repo_short_name': repo_short_name,
\ }
let bufname = repo_short_name.' '.join(a:log_opts)
silent exe (bufexists(bufname) ? 'buffer' : 'file') fnameescape(bufname)

Expand Down

0 comments on commit e4a0109

Please sign in to comment.