runtime(netrw): prevent E11 on FocusGained autocommand (#13718)

Commit: 
https://github.com/vim/vim/commit/fbd72d2d47257267bc6e3fe093ef8c225369ab79
Author: Christian Brabandt <[email protected]>
Date:   Tue Dec 19 20:22:18 2023 +0100

    runtime(netrw): prevent E11 on FocusGained autocommand 
(https://github.com/vim/vim/issues/13718)
    
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index d22e59d36..748ac2276 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

-- 
-- 
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/E1rFfn5-003aMH-OC%40256bit.org.

Raspunde prin e-mail lui