aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2026-08-15 11:45:44 -0400
committerGitHub <noreply@github.com>2026-08-15 11:45:44 -0400
commitcd2db7913af68632efb1642b7dafd5cba24bf75c (patch)
tree421051caa7fd732be0377ff441532262e3d86805 /runtime/lua
parent9cca923ab4f9ddca4b817e989eba546ddba675e1 (diff)
downloadrneovim-cd2db7913af68632efb1642b7dafd5cba24bf75c.tar.gz
rneovim-cd2db7913af68632efb1642b7dafd5cba24bf75c.tar.bz2
rneovim-cd2db7913af68632efb1642b7dafd5cba24bf75c.zip
fix(cwd): nvim_win_set_buf changes global CWD #41328
Problem: nvim_win_set_buf() on a non-current win, while the current win has a win-local dir, changes the global CWD: :vsplit | lcd .. :call nvim_win_set_buf(other_win, buf) :wincmd l :verbose pwd [global] /parent " expected: the initial cwd Analysis: `globaldir` is where to return when no local dir applies; NULL means the process CWD is already there. Switching to a window with no local dir makes update_cwd() chdir back to `globaldir` and clear it. kCtxKeepCwd restores the process CWD but not that bookkeeping, so the restored window-local dir is mistaken for the global one. Solution: Save/restore `globaldir` with the CWD.
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions