aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorAndrew Braxton <andrewcbraxton@gmail.com>2025-11-28 18:29:34 -0500
committerGitHub <noreply@github.com>2025-11-28 15:29:34 -0800
commitfd47bc2f046d3c8c9f01507e84072041512841d6 (patch)
treef1bbf38f01324c4648120ad5c36bacbc25586fd2 /test/functional/vimscript/executable_spec.lua
parent9f909929344287bc1246d6b4dab55d500b514396 (diff)
downloadrneovim-fd47bc2f046d3c8c9f01507e84072041512841d6.tar.gz
rneovim-fd47bc2f046d3c8c9f01507e84072041512841d6.tar.bz2
rneovim-fd47bc2f046d3c8c9f01507e84072041512841d6.zip
fix(restart): preserve original args on repeat invocations #36740
Problem: Calling `:restart` twice erases the original args passed to `nvim`. This is caused by interactions between the `:restart` command handler, the `v:argv` parsing logic in the UI restart handler, and the options added to `v:argv` by the server upon restart. For example, * Launch `nvim` as `nvim foo`: * initial argv: `nvim foo` * after nvim server launch: `nvim --embed foo` * Run `:restart` * after `ex_restart()`: `nvim -c '' --embed foo` * after `remote_ui_restart()`: `nvim -c '' foo` * after nvim server launch: `nvim --embed -c '' foo` * Run `:restart` again * after `ex_restart()`: `nvim -c '' --embed -c '' foo` * after `remote_ui_restart()`: `nvim -c ''` * after nvim server launch: `nvim --embed -c ''` The intention of the argv parser in `remote_ui_restart()` is to only take the first `-c cmd` and ignore any additional ones, but it actually ignores the rest of argv when it encounters a second `-c` and there are no `-` or `--` remaining. Solution: Fix the argv parser to reset the `skipping_minc` flag at the end of every iteration that does not reach the `continue` statement.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions