runtime(netrw): Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` (#13659)
Commit: https://github.com/vim/vim/commit/b52e7ac7c61cd88d04ee6b7b1808c361dd4a7640 Author: KSR-Yasuda <[email protected]> Date: Tue Dec 12 01:11:43 2023 +0900 runtime(netrw): Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` (https://github.com/vim/vim/issues/13659) * NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2` * NetRW: Fix wrong `w:netrw_bannercnt` setting closes: #13640 Signed-off-by: yasuda <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index 653631722..db66f5d85 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -10380,7 +10380,7 @@ fun! s:NetrwRemoteListing() let w:netrw_bannercnt= s:bannercnt endif if !exists("w:netrw_bannercnt") && exists("b:bannercnt") - let w:netrw_bannercnt= s:bannercnt + let w:netrw_bannercnt= b:bannercnt endif call s:RemotePathAnalysis(b:netrw_curdir) @@ -11274,6 +11274,10 @@ endfun fun! s:NetrwLocalRename(path) range " call Dfunc("NetrwLocalRename(path<".a:path.">)") + if !exists("w:netrw_bannercnt") + let w:netrw_bannercnt= b:netrw_bannercnt + endif + " preparation for removing multiple files/directories let ykeep = @@ let ctr = a:firstline @@ -11375,6 +11379,10 @@ fun! s:NetrwLocalRm(path) range " call Dfunc("s:NetrwLocalRm(path<".a:path.">)") " call Decho("firstline=".a:firstline." lastline=".a:lastline,'~'.expand("<slnum>")) + if !exists("w:netrw_bannercnt") + let w:netrw_bannercnt= b:netrw_bannercnt + endif + " preparation for removing multiple files/directories let ykeep = @@ let ret = 0 -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1rCivx-00EURZ-Fj%40256bit.org.
