Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

justinmk
Copy link
Member

@justinmk justinmk commented Nov 25, 2024

Problem

termopen has long been a superficial wrapper around jobstart, and has no real purpose. Also, vim.system and nvim_open_term presumably will replace all features of jobstart and termopen, so centralizing the logic will help with that. cc @lewis6991

From #5485 :

termopen() is misleading and unnecessary: most people don't realize how similar it is to jobstart(). Nudging script/plugin authors towards using jobstart() to spawn a terminal makes it obvious that all of the relevant mechanisms are shared and available between the two.

Solution

  • Introduce eval/deprecated.c, where all deprecated eval funcs will live.
  • Introduce "term" flag of jobstart.
  • Deprecate termopen.

Problem:
`termopen` has long been a superficial wrapper around `jobstart`, and
has no real purpose. Also, `vim.system` and `nvim_open_term` presumably
will replace all features of `jobstart` and `termopen`, so centralizing
the logic will help with that.

Solution:
- Introduce "term" flag of `jobstart`.
- Deprecate `termopen`.
@justinmk justinmk merged commit 8ef41f5 into neovim:master Dec 19, 2024
31 checks passed
@justinmk justinmk deleted the jobstart branch December 19, 2024 15:07
@justinmk justinmk changed the title feat(jobs): jobstart(…,{term:true}), deprecate termopen() feat(jobs): jobstart(…,{term=true}), deprecate termopen() Dec 19, 2024
@@ -20,8 +20,8 @@ There are several ways to open a channel:

2. Through stdin, stdout and stderr of a process spawned by |jobstart()|.

3. Through the PTY master end of a PTY opened with
`jobstart(..., {'pty': v:true})` or |termopen()|.
3. Through the PTY master end of a PTY opened with |nvim_open_term()| or
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvim_open_term() does not open a PTY.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed in #31479

mikavilpas added a commit to mikavilpas/yazi.nvim that referenced this pull request Dec 20, 2024
This was deprecated on neovim nightly yesterday, and will probably be
removed in the future. This should have no effect on the user.

neovim/neovim#31343
towry pushed a commit to pze/neovim that referenced this pull request Dec 31, 2024
Problem:
`termopen` has long been a superficial wrapper around `jobstart`, and
has no real purpose. Also, `vim.system` and `nvim_open_term` presumably
will replace all features of `jobstart` and `termopen`, so centralizing
the logic will help with that.

Solution:
- Introduce `eval/deprecated.c`, where all deprecated eval funcs will live.
- Introduce "term" flag of `jobstart`.
- Deprecate `termopen`.
mikavilpas added a commit to mikavilpas/yazi.nvim that referenced this pull request Jan 6, 2025
mikavilpas added a commit to mikavilpas/yazi.nvim that referenced this pull request Jan 6, 2025
mikavilpas added a commit to mikavilpas/yazi.nvim that referenced this pull request Jan 6, 2025
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.

2 participants