Skip to content

Commit

Permalink
fix quickfix for combined diffs
Browse files Browse the repository at this point in the history
The --cc option is issued for merge conflicts.
  • Loading branch information
Georgi Kirilov committed Aug 30, 2021
1 parent 549fb96 commit 832f7c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ function! gitgutter#quickfix(current_file)
elseif line =~ '^diff --git "'
let [_, fnamel, _, fnamer] = split(line, '"')
let fname = fnamel ==# fnamer ? fnamel : fnamel[2:]
elseif line =~ '^diff --cc [^"]'
let fname = line[10:]
elseif line =~ '^diff --cc "'
let [_, fname] = split(line, '"')
elseif line =~ '^@@'
let lnum = matchlist(line, '+\(\d\+\)')[1]
elseif lnum > 0
Expand Down

0 comments on commit 832f7c6

Please sign in to comment.