fix(tui): only forward stdin_fd on first attach (#22293)

This commit is contained in:
zeertzjq 2023-02-17 11:19:40 +08:00 committed by GitHub
parent d079c8cc5d
commit 371a74e4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,7 @@ void ui_client_attach(int width, int height, char *term)
PUT_C(opts, "stdout_tty", BOOLEAN_OBJ(stdout_isatty));
if (ui_client_forward_stdin) {
PUT_C(opts, "stdin_fd", INTEGER_OBJ(UI_CLIENT_STDIN_FD));
ui_client_forward_stdin = false; // stdin shouldn't be forwarded again #22292
}
}
ADD_C(args, DICTIONARY_OBJ(opts));