aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/pty_process_unix.h
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-02-03 23:54:32 -0500
committerJames McCoy <jamessan@jamessan.com>2021-02-06 07:12:33 -0500
commit33f92fe025dc326020fbb953f8c042711016fea8 (patch)
treeec721c684c925dac096b5a6885e0cf9015538383 /src/nvim/os/pty_process_unix.h
parentf4f6cce952c1233136f243e76d096e3aaa0b1689 (diff)
downloadrneovim-33f92fe025dc326020fbb953f8c042711016fea8.tar.gz
rneovim-33f92fe025dc326020fbb953f8c042711016fea8.tar.bz2
rneovim-33f92fe025dc326020fbb953f8c042711016fea8.zip
fix(pty): Always use $TERM from the job's env dict
Before #12937, the only way to specify the `$TERM` for a pty job was through the `TERM` key in the job's opts dict. This was shuttled to the child process throug a special field on the PtyProcess object and injected into the environment after forking. Now that we have a proper way to specify the environment for a job, we can simply ensure that the env dict has a proper `TERM` set and avoid the extra shuttling of data around. This deprecates the use of the `TERM` option, but will still honor it if present, although at a lower priority than a `TERM` present in the env dict. This also fixes #13874 because we're no longer trying to overwrite `TERM` in the env dict with the special pty `term_name`. Doing so raises an internal error because of the existing key which, under certain circumstances, would cause the "hit enter" prompt. However, since the child process had already forked, there was no way for the user to acknowledge the prompt and we would just hang there.
Diffstat (limited to 'src/nvim/os/pty_process_unix.h')
-rw-r--r--src/nvim/os/pty_process_unix.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/nvim/os/pty_process_unix.h b/src/nvim/os/pty_process_unix.h
index f7c57b3839..8c822eafad 100644
--- a/src/nvim/os/pty_process_unix.h
+++ b/src/nvim/os/pty_process_unix.h
@@ -17,7 +17,6 @@ static inline PtyProcess pty_process_init(Loop *loop, void *data)
{
PtyProcess rv;
rv.process = process_init(loop, kProcessTypePty, data);
- rv.term_name = NULL;
rv.width = 80;
rv.height = 24;
rv.tty_fd = -1;