Short circuit when jumping too far in blame history
References https://github.com/tpope/vim-fugitive/issues/607
This commit is contained in:
parent
b7b23001de
commit
073f3a37b9
@ -2070,6 +2070,7 @@ function! s:BlameJump(suffix) abort
|
|||||||
if winnr > 0
|
if winnr > 0
|
||||||
exe bufnr.'bdelete'
|
exe bufnr.'bdelete'
|
||||||
endif
|
endif
|
||||||
|
if exists(':Gblame')
|
||||||
execute 'Gblame '.args
|
execute 'Gblame '.args
|
||||||
execute lnum
|
execute lnum
|
||||||
let delta = line('.') - line('w0') - offset
|
let delta = line('.') - line('w0') - offset
|
||||||
@ -2079,6 +2080,7 @@ function! s:BlameJump(suffix) abort
|
|||||||
execute 'normal! '.(-delta)."\<C-Y>"
|
execute 'normal! '.(-delta)."\<C-Y>"
|
||||||
endif
|
endif
|
||||||
syncbind
|
syncbind
|
||||||
|
endif
|
||||||
return ''
|
return ''
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user