]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(netrw): prevent E11 on FocusGained autocommand (#13718)
authorChristian Brabandt <cb@256bit.org>
Tue, 19 Dec 2023 19:22:18 +0000 (20:22 +0100)
committerGitHub <noreply@github.com>
Tue, 19 Dec 2023 19:22:18 +0000 (20:22 +0100)
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/netrw.vim

index d22e59d36c2cc62c41ae212ac4d6b9717365a3b6..748ac22768302df1f3b974be12a861f9d7091e8e 100644 (file)
@@ -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