From ed5ac8dc5dd6aa1086c29317e884bb0d6d14ef9e Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 5 Jul 2019 00:55:57 -0400 Subject: [PATCH] Fix jump to patched line in :Gstatus --- autoload/fugitive.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9ace239..c1afe95 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4429,14 +4429,14 @@ function! s:StatusCfile(...) abort let line = getline('.') if len(info.sigil) && len(info.section) && len(info.paths) if info.section ==# 'Unstaged' && info.sigil !=# '-' - return [lead . info.paths[0], info.offset, 'normal!zv'] + return [lead . info.relative[0], info.offset, 'normal!zv'] elseif info.section ==# 'Staged' && info.sigil ==# '-' - return ['@:' . info.paths[0], info.offset, 'normal!zv'] + return ['@:' . info.relative[0], info.offset, 'normal!zv'] else - return [':0:' . info.paths[0], info.offset, 'normal!zv'] + return [':0:' . info.relative[0], info.offset, 'normal!zv'] endif elseif len(info.paths) - return [lead . info.paths[0]] + return [lead . info.relative[0]] elseif len(info.commit) return [info.commit] elseif line =~# '^\%(Head\|Merge\|Rebase\|Upstream\|Pull\|Push\): '