diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-10-09 14:59:40 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-10-09 16:57:44 +0200 |
| commit | d212676f90154de389d1b772b7adce8a15cff54d (patch) | |
| tree | 747bb8d594e5603f7df4664f0cc82852329fbf74 /runtime/lua/vim/_ftplugin/lua.lua | |
| parent | c60f1c635d87c172d7ef9910ff096c2294b2e3c9 (diff) | |
| download | rneovim-d212676f90154de389d1b772b7adce8a15cff54d.tar.gz rneovim-d212676f90154de389d1b772b7adce8a15cff54d.tar.bz2 rneovim-d212676f90154de389d1b772b7adce8a15cff54d.zip | |
feat(startup): --embed --listen waits for UI if stdin is not a pipe
Problem:
`nvim --embed --listen addr` always treats stdin as an RPC channel. If
stdin is /dev/null (e.g. backgrounded over ssh), the channel closes
before a UI can attach, so Nvim exits (detach=false behavior). If stdin
is a tty, keystrokes are read as RPC.
Solution:
With `--embed --listen`, open the stdio RPC channel only if stdin is
a pipe or socket. Else wait for a UI at the `--listen` address.
$ nvim --embed --listen ./nvim.sock
Nvim server (pid: 71984) waiting for UI, listening on: "./nvim.sock"
Note:
- No change when stdin is a pipe. So the test harness, TUI, and :restart
all behave exactly as before.
- The #29634 use-case of configuring a UI that attaches *after* startup
(a second UI, or reattach) still requires #25377 (reliable UIEnter).
Not affected by this change.
Diffstat (limited to 'runtime/lua/vim/_ftplugin/lua.lua')
0 files changed, 0 insertions, 0 deletions