Skip to content

Conversation

@jamessan
Copy link
Member

@jamessan jamessan commented Feb 4, 2021

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.

@jamessan jamessan force-pushed the pty-term branch 2 times, most recently from f3c8958 to ba200af Compare February 5, 2021 01:31
Before neovim#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 neovim#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.
@jamessan jamessan merged commit e455f0b into neovim:master Feb 6, 2021
@jamessan jamessan deleted the pty-term branch February 6, 2021 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

call termopen in loop throw error: uv__io_poll: Assertion `(u nsigned) fd < loop->nwatchers'

1 participant