Skip to content

Commit

Permalink
runtime(netrw): prevent E11 on FocusGained autocommand (#13718)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
chrisbra committed Dec 19, 2023
1 parent ef07a76 commit fbd72d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/autoload/netrw.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbd72d2

Please sign in to comment.