Skip to content

Commit b097baa

Browse files
authored
Merge pull request #21 from alfunx/diff3-conflictStyle
Support diff3 conflictStyle
2 parents 400c8bd + a87b6c0 commit b097baa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugin/diffconflicts.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ endfunction
2222
function! s:diffconfl()
2323
let l:origBuf = bufnr("%")
2424
let l:origFt = &filetype
25+
let l:conflictStyle = system("git config --get merge.conflictStyle")[:-2]
2526

2627
" Set up the right-hand side.
2728
rightb vsplit
@@ -37,7 +38,11 @@ function! s:diffconfl()
3738

3839
" Set up the left-hand side.
3940
wincmd p
40-
silent execute "g/^=======\\r\\?$/,/^>>>>>>> /d"
41+
if l:conflictStyle == "diff3"
42+
silent execute "g/^||||||| \\?/,/^>>>>>>> /d"
43+
else
44+
silent execute "g/^=======\\r\\?$/,/^>>>>>>> /d"
45+
endif
4146
silent execute "g/^<<<<<<< /d"
4247
diffthis
4348
endfunction

0 commit comments

Comments
 (0)