Fixed caching error in git_history
This commit is contained in:
parent
9aed3c09c9
commit
3fbf78a105
1 changed files with 2 additions and 2 deletions
4
vimrc
4
vimrc
|
@ -301,7 +301,7 @@ command! -nargs=* Hex call <sid>hex(<q-args>)
|
||||||
|
|
||||||
function! s:git_history()
|
function! s:git_history()
|
||||||
if exists("b:git_history")
|
if exists("b:git_history")
|
||||||
if b:git_history[0]+10 < localtime()
|
if b:git_history[0]+10 > localtime()
|
||||||
return b:git_history[1]
|
return b:git_history[1]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -309,7 +309,7 @@ function! s:git_history()
|
||||||
if exists("b:git_original_file") " Is this already a file@revision buffer?
|
if exists("b:git_original_file") " Is this already a file@revision buffer?
|
||||||
let l:fname = b:git_original_file
|
let l:fname = b:git_original_file
|
||||||
else
|
else
|
||||||
let l:fname = expand("%")
|
let l:fname = substitute(expand("%"), "\\\\", "/", "g")
|
||||||
end
|
end
|
||||||
let l:commits = system('git log --format="%h" '.l:fname)
|
let l:commits = system('git log --format="%h" '.l:fname)
|
||||||
let l:hist = split(l:commits, "\n")
|
let l:hist = split(l:commits, "\n")
|
||||||
|
|
Loading…
Reference in a new issue