diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-12-19 07:07:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 07:07:04 -0800 |
commit | 8ef41f590224dfeea2e51d9fec150e363fd72ee0 (patch) | |
tree | 2c9879066ef7e70dc1d178d46e2048bf1470f818 /test/functional/terminal/highlight_spec.lua | |
parent | a5a4149e9754a96c063a357c18397aa7906edf53 (diff) | |
download | rneovim-8ef41f590224dfeea2e51d9fec150e363fd72ee0.tar.gz rneovim-8ef41f590224dfeea2e51d9fec150e363fd72ee0.tar.bz2 rneovim-8ef41f590224dfeea2e51d9fec150e363fd72ee0.zip |
feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343
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`.
Diffstat (limited to 'test/functional/terminal/highlight_spec.lua')
-rw-r--r-- | test/functional/terminal/highlight_spec.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua index 5ed3c72b72..c43d139f70 100644 --- a/test/functional/terminal/highlight_spec.lua +++ b/test/functional/terminal/highlight_spec.lua @@ -33,7 +33,7 @@ describe(':terminal highlight', function() [12] = { bold = true, underdouble = true }, [13] = { italic = true, undercurl = true }, }) - command(("enew | call termopen(['%s'])"):format(testprg('tty-test'))) + command(("enew | call jobstart(['%s'], {'term':v:true})"):format(testprg('tty-test'))) feed('i') screen:expect([[ tty ready | @@ -150,7 +150,7 @@ it(':terminal highlight has lower precedence than editor #9964', function() }, }) -- Child nvim process in :terminal (with cterm colors). - fn.termopen({ + fn.jobstart({ nvim_prog_abs(), '-n', '-u', @@ -163,6 +163,7 @@ it(':terminal highlight has lower precedence than editor #9964', function() '+norm! ichild nvim', '+norm! oline 2', }, { + term = true, env = { VIMRUNTIME = os.getenv('VIMRUNTIME'), }, @@ -200,7 +201,7 @@ it('CursorLine and CursorColumn work in :terminal buffer in Normal mode', functi [4] = { background = Screen.colors.Grey90, reverse = true }, [5] = { background = Screen.colors.Red }, }) - command(("enew | call termopen(['%s'])"):format(testprg('tty-test'))) + command(("enew | call jobstart(['%s'], {'term':v:true})"):format(testprg('tty-test'))) screen:expect([[ ^tty ready | |*6 @@ -318,7 +319,7 @@ describe(':terminal highlight forwarding', function() [2] = { { fg_indexed = true, foreground = tonumber('0xe0e000') }, { foreground = 3 } }, [3] = { { foreground = tonumber('0xff8000') }, {} }, }) - command(("enew | call termopen(['%s'])"):format(testprg('tty-test'))) + command(("enew | call jobstart(['%s'], {'term':v:true})"):format(testprg('tty-test'))) feed('i') screen:expect([[ tty ready | @@ -364,7 +365,7 @@ describe(':terminal highlight with custom palette', function() [9] = { bold = true }, }) api.nvim_set_var('terminal_color_3', '#123456') - command(("enew | call termopen(['%s'])"):format(testprg('tty-test'))) + command(("enew | call jobstart(['%s'], {'term':v:true})"):format(testprg('tty-test'))) feed('i') screen:expect([[ tty ready | |