From 93b434949be1dc55e82dd4a4a4399eacf701e3d1 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 25 Mar 2021 19:31:50 -0400 Subject: [PATCH] Don't try to send :Git process CTRL-C when stdin is closed Curiously, this appears to work anyways in Neovim, but not Vim. --- autoload/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 0faa6ea..855081c 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2458,13 +2458,13 @@ function! s:RunWait(state, tmp, job) abort if !exists('*jobwait') sleep 1m endif - if !get(a:state, 'closed') + if !get(a:state, 'closed_in') let peek = getchar(1) if peek != 0 && !(has('win32') && peek == 128) let c = getchar() let c = type(c) == type(0) ? nr2char(c) : c if c ==# "\" - let a:state.closed = 1 + let a:state.closed_in = 1 if type(a:job) ==# type(0) call chanclose(a:job, 'stdin') else @@ -2486,7 +2486,7 @@ function! s:RunWait(state, tmp, job) abort finally if !finished try - if a:state.pty + if a:state.pty && !get(a:state, 'closed_in') call s:RunSend(a:job, "\") elseif type(a:job) == type(0) call jobstop(a:job)