diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-03-02 20:39:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-02 20:39:05 +0800 |
| commit | ab8371a26cf47a40d26af637455ea71da0d5a59d (patch) | |
| tree | a65bb28779c0cd06237becbaa59e42a68f0dac97 /runtime/syntax/python.vim | |
| parent | dea8430d5946c8e709e0196ae072f2394b34b5dc (diff) | |
| download | rneovim-ab8371a26cf47a40d26af637455ea71da0d5a59d.tar.gz rneovim-ab8371a26cf47a40d26af637455ea71da0d5a59d.tar.bz2 rneovim-ab8371a26cf47a40d26af637455ea71da0d5a59d.zip | |
fix(tui): server --listen error sometimes not visible (#38027)
Problem: If Nvim server fails to --listen and prints error before the
TUI enters alternate screen, the error isn't visible.
Solution: Forward server stderr using client side stderr handler instead
of having the server inherit client stderr file descriptor.
This does mean that `stderr_isatty` will be `false` in the server, but
that value doesn't matter in embedded mode.
Always pass `stdin_fd` to embedded server to avoid a hang when reading
from stdin when it's a TTY (not sure why one wants to do that, perhaps
by mistake), because if `stdin_fd` isn't passed, the server will try to
use stderr as stdin.
Example test failure on CI:
FAILED test/functional/terminal/tui_spec.lua @ 41: TUI exit status 1 and error message with server --listen error #34365
test/functional/terminal\tui_spec.lua:55: Failed to match any screen lines.
Expected (anywhere): "nvim%.exe: Failed to %-%-listen: address already in use:"
Actual:
|{114:nvim.exe -h"} |
| |
|[Process exited 1]^ |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|{5:-- TERMINAL --} |
Snapshot:
screen:expect([[
{114:nvim.exe -h"} |
|
[Process exited 1]^ |
|*13
{5:-- TERMINAL --} |
]])
stack traceback:
test\functional\ui\screen.lua:909: in function '_wait'
test\functional\ui\screen.lua:537: in function 'expect'
test/functional/terminal\tui_spec.lua:55: in function <test/functional/terminal\tui_spec.lua:41>
In this case, it appears that the client entered alternate screen in the
middle of the server's print_mainerr().
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions