Fix :Gstatus X in visual patch selection
This commit is contained in:
parent
54bc4ab9dd
commit
d88a0f8465
@ -1830,8 +1830,8 @@ function! fugitive#BufReadStatus() abort
|
||||
nnoremap <buffer> <silent> R :echohl WarningMsg<Bar>echo 'Reloading is automatic. Use :e to force'<Bar>echohl NONE<CR>
|
||||
nnoremap <buffer> <silent> g<Bar> :<C-U>echoerr 'Changed to X'<CR>
|
||||
xnoremap <buffer> <silent> g<Bar> :<C-U>echoerr 'Changed to X'<CR>
|
||||
nnoremap <buffer> <silent> X :<C-U>execute <SID>StageDelete(line('.'), line('.'), v:count)<CR>
|
||||
xnoremap <buffer> <silent> X :<C-U>execute <SID>StageDelete(line("'<"), line("'<"), v:count)<CR>
|
||||
nnoremap <buffer> <silent> X :<C-U>execute <SID>StageDelete(line('.'), 0, v:count)<CR>
|
||||
xnoremap <buffer> <silent> X :<C-U>execute <SID>StageDelete(line("'<"), line("'>"), v:count)<CR>
|
||||
nnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(0)<CR><Home>
|
||||
xnoremap <buffer> . :<C-U> <C-R>=<SID>StageArgs(1)<CR><Home>
|
||||
nnoremap <buffer> <silent> <F1> :help fugitive-mappings<CR>
|
||||
@ -2835,8 +2835,8 @@ function! s:StageApply(info, reverse, extra) abort
|
||||
call s:throw(output)
|
||||
endfunction
|
||||
|
||||
function! s:StageDelete(lnum, ignored, count) abort
|
||||
let info = get(s:Selection(a:lnum, a:lnum), 0, {'filename': ''})
|
||||
function! s:StageDelete(lnum1, lnum2, count) abort
|
||||
let info = get(s:Selection(a:lnum1, a:lnum2), 0, {'filename': ''})
|
||||
if empty(info.filename)
|
||||
return ''
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user