Fix jump from diff to file
This code hasn't been touched in 4 years; how did it break?!
This commit is contained in:
parent
cfa485ede7
commit
8851b8fe64
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user