mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Accomodate loading Fugitive buffers in popup window
Closes https://github.com/tpope/vim-fugitive/issues/1418
This commit is contained in:
@@ -1560,24 +1560,9 @@ function! s:ReplaceCmd(cmd) abort
|
|||||||
if exec_error
|
if exec_error
|
||||||
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
call s:throw((len(err) ? err : filereadable(temp) ? join(readfile(temp), ' ') : 'unknown error running ' . a:cmd))
|
||||||
endif
|
endif
|
||||||
let temp = s:Resolve(temp)
|
silent exe '$read ++edit' s:fnameescape(temp)
|
||||||
let fn = expand('%:p')
|
silent keepjumps 1delete _
|
||||||
silent exe 'keepalt file '.temp
|
call delete(temp)
|
||||||
let modelines = &modelines
|
|
||||||
try
|
|
||||||
set modelines=0
|
|
||||||
silent keepjumps noautocmd edit!
|
|
||||||
finally
|
|
||||||
let &modelines = modelines
|
|
||||||
try
|
|
||||||
silent exe 'keepalt file '.s:fnameescape(fn)
|
|
||||||
catch /^Vim\%((\a\+)\)\=:E302:/
|
|
||||||
endtry
|
|
||||||
call delete(temp)
|
|
||||||
if s:cpath(fnamemodify(bufname('$'), ':p'), temp)
|
|
||||||
silent! execute 'bwipeout '.bufnr('$')
|
|
||||||
endif
|
|
||||||
endtry
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:QueryLog(refspec) abort
|
function! s:QueryLog(refspec) abort
|
||||||
|
|||||||
Reference in New Issue
Block a user