mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
api: allow open non-current buffer as terminal (+ xmas bonus)
vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
This commit is contained in:
@@ -10731,7 +10731,7 @@ static void f_termopen(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
INTEGER_OBJ(pid), false, false, &err);
|
||||
api_clear_error(&err);
|
||||
|
||||
channel_terminal_open(chan);
|
||||
channel_terminal_open(curbuf, chan);
|
||||
channel_create_event(chan, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user