neovim icon indicating copy to clipboard operation
neovim copied to clipboard

Lua event handler for :terminal OSC codes, etc.

Open justinmk opened this issue 10 years ago • 1 comments

see https://github.com/neovim/neovim/pull/4412#issuecomment-192544136

May help with https://github.com/neovim/neovim/issues/4349

problem

Lua/Vimscript plugins can't handle OSC codes emitted by :terminal programs.

solution

  • set up Lua callback dispatch via vterm_state_set_unrecognised_fallbacks() ?
  • also allow Lua handling of "known" terminal sequences / commands?
    • only for :terminal. Not needed for TUI because we have vim.ui_attach().

related

  • https://github.com/neovim/neovim/pull/17197
  • https://github.com/neovim/neovim/pull/16740
  • https://github.com/neovim/neovim/pull/22159

justinmk avatar Mar 05 '16 01:03 justinmk

  • set up Lua callback dispatch via vterm_state_set_unrecognised_fallbacks() ?
  • also allow Lua handling of "known" terminal sequences / commands?

What do you think about creating autocommand events for these? I think it'd make sense now that autocommands are easy to interact with from Lua.

glacambre avatar Jan 12 '23 06:01 glacambre

OSC/DCS are now forwarded to the TermRequest autocmd event.

justinmk avatar May 03 '24 11:05 justinmk