summaryrefslogtreecommitdiff
path: root/src/structs.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-03 13:51:25 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-03 13:51:25 +0200
commit7c9aec4ac86ccc455c0859d9393253141e3f77b6 (patch)
treee03624a977c4f3d9b040a866356dbc8245036603 /src/structs.h
parentd8dc1799377027be622d8571545658b20042e92e (diff)
downloadvim-git-7c9aec4ac86ccc455c0859d9393253141e3f77b6.tar.gz
patch 8.0.0846: cannot get the name of the pty of a jobv8.0.0846
Problem: Cannot get the name of the pty of a job. Solution: Add the "tty" entry to the job info. (Ozaki Kiichi, closes #1920) Add the term_gettty() function.
Diffstat (limited to 'src/structs.h')
-rw-r--r--src/structs.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/structs.h b/src/structs.h
index cfe72dba8..522e15a98 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1478,6 +1478,7 @@ struct jobvar_S
PROCESS_INFORMATION jv_proc_info;
HANDLE jv_job_object;
#endif
+ char_u *jv_tty_name; /* controlling tty, allocated */
jobstatus_T jv_status;
char_u *jv_stoponexit; /* allocated */
int jv_exitval;
@@ -1537,18 +1538,20 @@ typedef enum {
JIO_OUT
} job_io_T;
+#define CH_PART_FD(part) ch_part[part].ch_fd
+
/* Ordering matters, it is used in for loops: IN is last, only SOCK/OUT/ERR
* are polled. */
typedef enum {
PART_SOCK = 0,
-#define CH_SOCK_FD ch_part[PART_SOCK].ch_fd
+#define CH_SOCK_FD CH_PART_FD(PART_SOCK)
#ifdef FEAT_JOB_CHANNEL
PART_OUT,
-# define CH_OUT_FD ch_part[PART_OUT].ch_fd
+# define CH_OUT_FD CH_PART_FD(PART_OUT)
PART_ERR,
-# define CH_ERR_FD ch_part[PART_ERR].ch_fd
+# define CH_ERR_FD CH_PART_FD(PART_ERR)
PART_IN,
-# define CH_IN_FD ch_part[PART_IN].ch_fd
+# define CH_IN_FD CH_PART_FD(PART_IN)
#endif
PART_COUNT
} ch_part_T;