Put the eventignore reset inside a finally block to ensure it's called.

This commit is contained in:
Phil Runninger
2020-01-16 10:51:12 -05:00
parent 901aba632b
commit 5fbf0d7dba
2 changed files with 15 additions and 9 deletions

View File

@@ -169,8 +169,11 @@ function! nerdtree#exec(cmd, ignoreAll) abort
if a:ignoreAll
set eventignore=all
endif
exec a:cmd
let &eventignore = old_ei
try
exec a:cmd
finally
let &eventignore = old_ei
endtry
endfunction
" FUNCTION: nerdtree#has_opt(options, name) {{{2