From 93480f7fbaa5b4e5418d95dd35005daa6142dbb9 Mon Sep 17 00:00:00 2001 From: Till Bungert Date: Thu, 13 Feb 2025 15:24:01 +0100 Subject: feat(term): trigger TermRequest for APC (#32407) Co-authored-by: Gregory Anders Co-authored-by: zeertzjq --- test/functional/terminal/buffer_spec.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 4635259e33..f2d679bd5d 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -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([[ -- cgit