Files
neovim/runtime
zeertzjq 3c9fe92e42 vim-patch:9.2.1045: runtime(netrw): raises E46 when changing directory fails (#41783)
Problem:  Netrw raises E46 when changing directory fails.
Solution: Remove unused assignments to the read-only directory argument
          and cover both error-handling branches with a regression test
          (Qiming zhao).

When :lcd fails with E472, s:NetrwLcd() assigns to a:newdir instead of
returning -1. The fallback assignment also refers to dirname, which is
undefined on this path. Neither assignment can update the caller's
directory variable. Keep the existing option restoration and failure
return while removing the invalid assignments.

Supported by AI.

closes: vim/vim#21226

2f72e4c72f

Co-authored-by: Qiming zhao <chemzqm@gmail.com>
2026-09-08 14:57:40 +00:00
..
2026-09-07 15:33:22 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00
2023-08-13 13:25:10 +01:00