mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(tui): v:argv does not report the original argv[0] #24015
Problem:
Since TUI was moved to another process 2448816956
v:argv and v:progname don't report the original argv[0].
["/usr/bin/nvim", "--embed", ...]
Solution:
Use argv[0] instead of VV_PROGPATH in ui_client_start_server().
Fix #23953
This commit is contained in:
parent
bc67bbe446
commit
0ce065a332
@ -43,7 +43,7 @@ uint64_t ui_client_start_server(int argc, char **argv)
|
||||
varnumber_T exit_status;
|
||||
char **args = xmalloc(((size_t)(2 + argc)) * sizeof(char *));
|
||||
int args_idx = 0;
|
||||
args[args_idx++] = xstrdup(get_vim_var_str(VV_PROGPATH));
|
||||
args[args_idx++] = xstrdup(argv[0]);
|
||||
args[args_idx++] = xstrdup("--embed");
|
||||
for (int i = 1; i < argc; i++) {
|
||||
args[args_idx++] = xstrdup(argv[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user