diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-07-23 07:28:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-22 23:28:05 +0000 |
| commit | 6ecf226e44c3976e6a2c473eef1ee938215e1ed4 (patch) | |
| tree | 095606998264c9cb11044aa1eca906d673da1c10 /runtime/syntax/python.vim | |
| parent | ada20074535c253fe31ef5c6a927f9c38367fa8f (diff) | |
| download | rneovim-6ecf226e44c3976e6a2c473eef1ee938215e1ed4.tar.gz rneovim-6ecf226e44c3976e6a2c473eef1ee938215e1ed4.tar.bz2 rneovim-6ecf226e44c3976e6a2c473eef1ee938215e1ed4.zip | |
vim-patch:6e46829: runtime(netrw): fix E471 in Neovim when g:netrw_chgwin is one past the last window (#40911)
Problem: Opening a file from a netrw listing throws
"E471: Argument required: keepj keepalt 2wincmd 1" when
g:netrw_chgwin equals winnr('$')+1, e.g. after opening
:Lexplore (which sets g:netrw_chgwin=2) and closing the
sidebar, then browsing with :Explore in the remaining window.
s:NetrwBrowseChgDir builds the window jump as
"g:netrw_chgwin wincmd curwin", passing the saved window
NUMBER where wincmd expects its single-letter argument.
Solution: Jump back to the saved window with "curwin wincmd w", as the
surrounding comment intends; the following statement then
performs the actual jump to g:netrw_chgwin.
The faulty line dates back to at least Vim 9.0
(runtime/autoload/netrw.vim:4976 at v9.0.0000).
Reported (against the since-archived netrw repo) in
saccarosium/netrw.vim#98 and neovim/neovim#34169.
Note: no test, because the error reproduces only in Neovim.
closes: vim/vim#20741
https://github.com/vim/vim/commit/6e468299914a81b54dea7988fc2760df16691cbb
Co-authored-by: erdivartanovich <erdivartanovich@gmail.com>
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions