diff src/terminal.c @ 14139:4d3f6bf86bec v8.1.0087

patch 8.1.0087: v:shell_error is always zero when using terminal for "!cmd" commit https://github.com/vim/vim/commit/f9c3883b11b33f0c548df5e949ba59fde74d3e7b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 19 19:59:20 2018 +0200 patch 8.1.0087: v:shell_error is always zero when using terminal for "!cmd" Problem: v:shell_error is always zero when using terminal for "!cmd". Solution: Use "exitval" of terminal-job. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/2994)
author Christian Brabandt <cb@256bit.org>
date Tue, 19 Jun 2018 20:00:08 +0200
parents 08b0b6d6cbe7
children 3c80092eb211
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -5336,6 +5336,12 @@ term_send_eof(channel_T *ch)
 	}
 }
 
+    job_T *
+term_getjob(term_T *term)
+{
+    return term != NULL ? term->tl_job : NULL;
+}
+
 # if defined(WIN3264) || defined(PROTO)
 
 /**************************************