From: Christian Brabandt Date: Tue, 19 Dec 2023 19:22:18 +0000 (+0100) Subject: runtime(netrw): prevent E11 on FocusGained autocommand (#13718) X-Git-Tag: v9.0.2177~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbd72d2d47257267bc6e3fe093ef8c225369ab79;p=thirdparty%2Fvim.git runtime(netrw): prevent E11 on FocusGained autocommand (#13718) Signed-off-by: Christian Brabandt --- diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index d22e59d36c..748ac22768 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -10963,6 +10963,10 @@ fun! s:LocalBrowseRefresh() " call Dret("s:LocalBrowseRefresh : don't refresh when focus not on netrw window") return endif + if !empty(getcmdwintype()) + " cannot move away from cmdline window, see :h E11 + return + endif if exists("s:netrw_events") && s:netrw_events == 1 " s:LocalFastBrowser gets called (indirectly) from a let s:netrw_events= 2