Add shortcuts for getting hunks from other views of the diff. (#801)
Fixes #798
This commit is contained in:
parent
58ed86e434
commit
b3a8be6975
@ -1776,13 +1776,17 @@ function! s:Diff(vert,keepfocus,...) abort
|
||||
let nr = bufnr('')
|
||||
execute 'leftabove '.vert.'split `=fugitive#buffer().repo().translate(s:buffer().expand('':2''))`'
|
||||
execute 'nnoremap <buffer> <silent> dp :diffput '.nr.'<Bar>diffupdate<CR>'
|
||||
let nr2 = bufnr('')
|
||||
call s:diffthis()
|
||||
wincmd p
|
||||
execute 'rightbelow '.vert.'split `=fugitive#buffer().repo().translate(s:buffer().expand('':3''))`'
|
||||
execute 'nnoremap <buffer> <silent> dp :diffput '.nr.'<Bar>diffupdate<CR>'
|
||||
let nr3 = bufnr('')
|
||||
call s:diffthis()
|
||||
wincmd p
|
||||
call s:diffthis()
|
||||
execute 'nnoremap <buffer> <silent> d2o :diffget '.nr2.'<Bar>diffupdate<CR>'
|
||||
execute 'nnoremap <buffer> <silent> d3o :diffget '.nr3.'<Bar>diffupdate<CR>'
|
||||
return post
|
||||
elseif len(args)
|
||||
let arg = join(args, ' ')
|
||||
|
Loading…
x
Reference in New Issue
Block a user