aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/channel.c
Commit message (Collapse)AuthorAge
* refactor: remove redundant castsDundar Göc2021-10-07
|
* refactor: format with uncrustify #15722dundargoc2021-09-19
|
* feat(f_chansend): support Blob data argumentSean Dewar2021-09-16
|
* feat(api): nvim_get_chan_info: include "argv" for jobs #15537Justin M. Keyes2021-09-01
| | | ref #15440
* refactor(map): remove extra-allocating map_new/map_free functionsBjörn Linse2021-08-22
| | | | | | | | | | Note: the reason for removing them is not that there after this refactor is no use of them, but rather that having them available is an anti-pattern: they manange an _extra_ heap allocation which has nothing to do with the functionality of the map itself (khash manages the real buffers internally). In case there happens to be a reason to allocate the map structure itself later, this should be made explicit using xcalloc/xfree calls.
* feat(terminal): TermClose: set exit code in v:event.status #15406Gregory Anders2021-08-20
| | | Closes #4713
* Rename stdin to stdin_modeGregory Anders2021-07-12
| | | | stdin is a macro in Windows builds.
* feat(job): add parameter to close stdinGregory Anders2021-07-12
| | | | | | | | | | | | | | | | Some programs behave differently when they detect that stdin is being piped. This can be problematic when these programs are used with the job control API where stdin is attached, but not typically used. It is possible to run the job using a PTY which circumvents this problem, but that includes a lot of overhead when simply closing the stdin pipe would suffice. To enable this behavior, add a new parameter to the jobstart options dict called "stdin" with two valid values: "pipe" (the default) implements the existing behavior of opening a channel for stdin and "null" which disconnects stdin (or, if you prefer, connects it to /dev/null). This is extensible so that other modes can be added in the future.
* Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559)Jan Edmund Lazo2021-05-15
|
* api: fix use-after-free in nvim_chan_sendBjörn Linse2021-04-04
|
* api: allow open non-current buffer as terminal (+ xmas bonus)Björn Linse2021-03-12
| | | | vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
* fix(pty): Always use $TERM from the job's env dictJames McCoy2021-02-06
| | | | | | | | | | | | | | | | | | | | | | Before #12937, the only way to specify the `$TERM` for a pty job was through the `TERM` key in the job's opts dict. This was shuttled to the child process throug a special field on the PtyProcess object and injected into the environment after forking. Now that we have a proper way to specify the environment for a job, we can simply ensure that the env dict has a proper `TERM` set and avoid the extra shuttling of data around. This deprecates the use of the `TERM` option, but will still honor it if present, although at a lower priority than a `TERM` present in the env dict. This also fixes #13874 because we're no longer trying to overwrite `TERM` in the env dict with the special pty `term_name`. Doing so raises an internal error because of the existing key which, under certain circumstances, would cause the "hit enter" prompt. However, since the child process had already forked, there was no way for the user to acknowledge the prompt and we would just hang there.
* Use dict_T to pass env vars to process spawning codeJames McCoy2021-01-31
| | | | Co-authored-by: Matthieu Coudron <mattator@gmail.com>
* Add overlapped option to jobstarterw72020-06-10
| | | | | | | When UV_OVERLAPPED_PIPE was used for the pipe passed to the child process, a problem occurred with the standard input of the .Net Framework application (#11809). Therefore, add the overlapped option to jobstart() and change it so that it is set only when necessary
* nvim: Correctly setup global channelsAndreas Schneider2020-02-23
| | | | | | | | | As gcc10 uses -fno-common by default, global variables declared with the same name more than once is not allowed anymore revealing this issue. We need to define it as extern to access it. See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
* Change to replace stderr with conouterw72020-01-17
|
* Rename from os_win_conpty.{c,h} to pty_conpty_win.{c,h}erw72020-01-17
|
* Add stdin, stdout replacement functionserw72020-01-17
|
* Change to use ConPTY, if availableerw72020-01-17
|
* Add os_getfullenv_size/os_copyfullenvJames McCoy2019-12-11
|
* jobstart now supports env/clear_envMatthieu Coudron2019-12-11
| | | | to modify the environment of the launched job.
* UIAttach, UIDetachRui Abreu Ferreira2019-09-12
|
* :ls : show "R", "F" for terminal-jobs #10370Justin M. Keyes2019-06-29
| | | | | | | | | | | This matches Vim behavior. From `:help :ls` : R a terminal buffer with a running job F a terminal buffer with a finished job ? a terminal buffer without a job: `:terminal NONE` TODO: implement `:terminal NONE`. ref #10349
* channel: refactor events, prevent recursive invocation of eventsBjörn Linse2019-06-18
|
* api: implement object namespacesBjörn Linse2018-11-24
| | | | | | | | | Namespaces is a lightweight concept that should be used to group objects for purposes of bulk operations and introspection. This is initially used for highlights and virtual text in buffers, and is planned to also be used for extended marks. There is no plan use them for privileges or isolation, neither to introduce nanespace-level options.
* channel: avoid buffering output when only terminal and no callbacks are activeBjörn Linse2018-11-08
|
* jobstart(): Fix hang on non-executable cwd #9204Tommy Allen2018-11-07
| | | | | | | * os/fs.c: add os_isdir_executable() * eval.c: fix hang on job start caused by non-executable cwd option * channel.c: assert cwd is an executable directory * test: jobstart() produces error when using non-executable cwd
* startup: always wait for UI with --embed, unless --headless also is suppliedBjörn Linse2018-09-22
|
* replace fallthrough comment with macroJan Edmund Lazo2018-09-21
| | | | Follow-up of vim-patch:8.0.1215
* channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuffoni-link2018-07-15
| | | | | | | | Without this patch the following commands would crash: :call rpcstart('unknown_command') :set sh=unknown_command :call jobstart('ls',{'rpc':1})
* terminal: flush vterm output buffer on pty output #8486林千里2018-06-08
| | | | | | | | | | | Fixes #4151 libvterm uses an "output buffer" for terminal reporting (e.g. \e[6n to report cursor position) Flush it in on_channel_output() not just terminal_send_key() See also this line from pangoterm: https://bazaar.launchpad.net/~leonerd/pangoterm/trunk/view/607/pangoterm.c#L2159
* api: list information about all channels/jobs.Björn Linse2018-05-23
| | | | | Fire autocmd when channel opens or its info changes. Add a way for API clients can describe themselves.
* channel: avoid references to non-rooted vimL list with outputBjörn Linse2018-05-17
| | | | | | | likely fixes #7768 #7913 If multiple internal stream callbacks were recieved before vimL callbacks got called, only invoke one vimL callback with all data.
* job-control: mitigate process-kill raceJustin M. Keyes2018-04-15
| | | | | | | | | | | | | | | children_kill_cb() is racey. One obvious problem is that process_close_handles() is *queued* by on_process_exit(), so when children_kill_cb() is invoked, the dead process might still be in the `loop->children` list. If the OS already reclaimed the dead PID, Nvim may try to SIGKILL it. Avoid that by checking `proc->status`. Vim doesn't have this problem because it doesn't attempt to kill processes that ignored SIGTERM after a timeout. closes #8269
* channels: cleanup channel freeing codeBjörn Linse2018-04-12
|
* channels: delay free so that libuv can cleanup handlesBjörn Linse2018-04-12
| | | | add test for a crash this caused
* log/channels: Formatting. Also log loopback channel. #8146Justin M. Keyes2018-03-18
|
* channel: Make empty output be represented by `['']` againZyX2018-01-14
|
* *: Provide list length when allocating listsZyX2018-01-14
|
* Merge #7708 from ZyX-I/hide-container-implJustin M. Keyes2017-12-23
|\
| * *: Start hiding list implementationZyX2017-12-10
| | | | | | | | Most of files, except for eval.c and eval/* were only processed by perl.
* | channel: check for existance before trying to set keyBjörn Linse2017-12-23
|/ | | | This avoids an error message in async context, where it is not safe.
* channels: improvements to bufferingBjörn Linse2017-11-25
|
* channels: more consistent event handlingBjörn Linse2017-11-25
| | | | | terminal: libvterm now receives data in async context. This was "almost" safe already, as redraws were queued anyway.
* channels: refactor jobwaitBjörn Linse2017-11-25
|
* channels: reimplement logging (as stub for proper event)Björn Linse2017-11-25
|
* channels: stderr channelBjörn Linse2017-11-25
|
* channels: generalize jobclose()Björn Linse2017-11-25
|
* channels: move away term code from eval.cBjörn Linse2017-11-25
|
* channels: allow bytes sockets and stdio, and buffered bytes outputBjörn Linse2017-11-24
|