mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
Fix jump from diff to file
This code hasn't been touched in 4 years; how did it break?!
This commit is contained in:
@@ -2850,7 +2850,7 @@ function! s:cfile() abort
|
|||||||
elseif getline('.') =~# '^[+-]' && search('^@@ -\d\+,\d\+ +\d\+,','bnW')
|
elseif getline('.') =~# '^[+-]' && search('^@@ -\d\+,\d\+ +\d\+,','bnW')
|
||||||
let type = getline('.')[0]
|
let type = getline('.')[0]
|
||||||
let lnum = line('.') - 1
|
let lnum = line('.') - 1
|
||||||
let offset = -1
|
let offset = 0
|
||||||
while getline(lnum) !~# '^@@ -\d\+,\d\+ +\d\+,'
|
while getline(lnum) !~# '^@@ -\d\+,\d\+ +\d\+,'
|
||||||
if getline(lnum) =~# '^[ '.type.']'
|
if getline(lnum) =~# '^[ '.type.']'
|
||||||
let offset += 1
|
let offset += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user