summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_system.lua
diff options
context:
space:
mode:
authorJudit Novak <judit.novak@gmail.com>2025-04-16 12:36:07 +0200
committerGitHub <noreply@github.com>2025-04-16 03:36:07 -0700
commitfd973c0a4ec0246708d0fcc46e66e38dd1f89a26 (patch)
tree27f64cb48c9eab87f2088255ee622f3293e931fe /runtime/lua/vim/_system.lua
parent7432781e71842a595365c351b105971ac3662dff (diff)
fix(env.c): drop envmap, free os_getenv() result #32683
Problem: vim.uv.os_setenv gets "stuck" per-key. #32550 Caused by the internal `envmap` cache. #7920 :echo $FOO <-- prints nothing :lua vim.uv.os_setenv("FOO", "bar") :echo $FOO <-- prints bar (as expected) :lua vim.uv.os_setenv("FOO", "fizz") :echo $FOO <-- prints bar, still (not expected. Should be "fizz") :lua vim.uv.os_unsetenv("FOO") :echo $FOO <-- prints bar, still (not expected. Should be nothing) :lua vim.uv.os_setenv("FOO", "buzz") :echo $FOO <-- prints bar, still (not expected. Should be "buzz") Solution: - Remove the `envmap` cache. - Callers to `os_getenv` must free the result. - Update all call-sites. - Introduce `os_getenv_noalloc`. - Extend `os_env_exists()` the `nonempty` parameter.
Diffstat (limited to 'runtime/lua/vim/_system.lua')
0 files changed, 0 insertions, 0 deletions