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

4 views
Skip to first unread message

Christian Brabandt

unread,
Dec 19, 2023, 2:30:12 PM12/19/23
to vim...@googlegroups.com
runtime(netrw): prevent E11 on FocusGained autocommand (#13718)

Commit: https://github.com/vim/vim/commit/fbd72d2d47257267bc6e3fe093ef8c225369ab79
Author: Christian Brabandt <c...@256bit.org>
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 <c...@256bit.org>

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
Reply all
Reply to author
Forward
0 new messages