runtime(netrw): prevent E11 on FocusGained autocommand (#13718)
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index d22e59d..748ac22 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -10963,6 +10963,10 @@
" 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