mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-10 23:29:19 +08:00
Map dp in stage conflict to do the right thing
This commit is contained in:
1 parent
3366704c8f
commit
aebbbd335e
1 file changed
+3
@@ -1124,10 +1124,13 @@ function! s:Diff(bang,...) abort
|
|||||||
if exists(':DiffGitCached')
|
if exists(':DiffGitCached')
|
||||||
return 'DiffGitCached'
|
return 'DiffGitCached'
|
||||||
elseif (!a:0 || a:1 == ':') && s:buffer().commit() =~# '^[0-1]\=$' && s:repo().git_chomp_in_tree('ls-files', '--unmerged', '--', s:buffer().path()) !=# ''
|
elseif (!a:0 || a:1 == ':') && s:buffer().commit() =~# '^[0-1]\=$' && s:repo().git_chomp_in_tree('ls-files', '--unmerged', '--', s:buffer().path()) !=# ''
|
||||||
|
let nr = bufnr('')
|
||||||
execute 'leftabove '.split.' `=fugitive#buffer().repo().translate(s:buffer().expand('':2''))`'
|
execute 'leftabove '.split.' `=fugitive#buffer().repo().translate(s:buffer().expand('':2''))`'
|
||||||
|
execute 'nnoremap <buffer> <silent> dp :diffput '.nr.'<CR>'
|
||||||
diffthis
|
diffthis
|
||||||
wincmd p
|
wincmd p
|
||||||
execute 'rightbelow '.split.' `=fugitive#buffer().repo().translate(s:buffer().expand('':3''))`'
|
execute 'rightbelow '.split.' `=fugitive#buffer().repo().translate(s:buffer().expand('':3''))`'
|
||||||
|
execute 'nnoremap dp <buffer> <silent> :diffput '.nr.'<CR>'
|
||||||
diffthis
|
diffthis
|
||||||
wincmd p
|
wincmd p
|
||||||
diffthis
|
diffthis
|
||||||
|
|||||||
Reference in new issue
Block a user