mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 07:13:52 -05:00
Eliminate blank line after resuming from GIT_EDITOR
Also add has_key(a:tmp, 'echo') checks to allow for future async workflows.
This commit is contained in:
@@ -2490,6 +2490,9 @@ function! s:RunSend(job, str) abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:RunEcho(tmp) abort
|
function! s:RunEcho(tmp) abort
|
||||||
|
if !has_key(a:tmp, 'echo')
|
||||||
|
return
|
||||||
|
endif
|
||||||
let data = a:tmp.echo
|
let data = a:tmp.echo
|
||||||
let a:tmp.echo = matchstr(data, "[\r\n]\\+$")
|
let a:tmp.echo = matchstr(data, "[\r\n]\\+$")
|
||||||
if len(a:tmp.echo)
|
if len(a:tmp.echo)
|
||||||
@@ -2541,7 +2544,10 @@ function! s:RunWait(state, tmp, job) abort
|
|||||||
throw 'fugitive: close callback did not fire; this should never happen'
|
throw 'fugitive: close callback did not fire; this should never happen'
|
||||||
endif
|
endif
|
||||||
call s:RunEcho(a:tmp)
|
call s:RunEcho(a:tmp)
|
||||||
echo
|
if has_key(a:tmp, 'echo')
|
||||||
|
let a:tmp.echo = substitute(a:tmp.echo, "^\r\\=\n", '', '')
|
||||||
|
echo
|
||||||
|
endif
|
||||||
call s:RunEdit(a:state, a:tmp, a:job)
|
call s:RunEdit(a:state, a:tmp, a:job)
|
||||||
let finished = 1
|
let finished = 1
|
||||||
finally
|
finally
|
||||||
|
|||||||
Reference in New Issue
Block a user