mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
feat(term): trigger TermRequest for APC (#32407)
Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
@@ -350,6 +350,17 @@ describe(':terminal buffer', function()
|
||||
eq(termbuf, eval('g:termbuf'))
|
||||
end)
|
||||
|
||||
it('emits TermRequest events for APC', function()
|
||||
local term = api.nvim_open_term(0, {})
|
||||
|
||||
-- cwd will be inserted in a file URI, which cannot contain backs
|
||||
local cwd = t.fix_slashes(fn.getcwd())
|
||||
local parent = cwd:match('^(.+/)')
|
||||
local expected = '\027_Gfile://host' .. parent
|
||||
api.nvim_chan_send(term, string.format('%s\027\\', expected))
|
||||
eq(expected, eval('v:termrequest'))
|
||||
end)
|
||||
|
||||
it('TermRequest synchronization #27572', function()
|
||||
command('autocmd! nvim.terminal TermRequest')
|
||||
local term = exec_lua([[
|
||||
|
||||
Reference in New Issue
Block a user