motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 073f3a37b9a7c2db488802e0da7b8d84fef2ab84 (tree)
parent b7b23001def8d2ae816ff6dd772cd50976189e0e
Author: Tim Pope <code@tpope.net>
Date:   Wed, 30 Sep 2015 18:49:29 -0400

Short circuit when jumping too far in blame history

References https://github.com/tpope/vim-fugitive/issues/607

Diffstat:
Mplugin/fugitive.vim | 18++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -2070,15 +2070,17 @@ function! s:BlameJump(suffix) abort if winnr > 0 exe bufnr.'bdelete' endif - execute 'Gblame '.args - execute lnum - let delta = line('.') - line('w0') - offset - if delta > 0 - execute 'normal! '.delta."\<C-E>" - elseif delta < 0 - execute 'normal! '.(-delta)."\<C-Y>" + if exists(':Gblame') + execute 'Gblame '.args + execute lnum + let delta = line('.') - line('w0') - offset + if delta > 0 + execute 'normal! '.delta."\<C-E>" + elseif delta < 0 + execute 'normal! '.(-delta)."\<C-Y>" + endif + syncbind endif - syncbind return '' endfunction