Don't use silent when raising User events (#1164)

* Remove silent from doautocmd. Prevent errors with exists('#...').

* Update version number in change log.
This commit is contained in:
Phil Runninger 2020-08-07 00:37:56 -04:00 committed by GitHub
parent 4a32dd0be3
commit 373a4b28e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
-->
#### 6.9
- **.6**: Don't use silent when raising User events (PhilRunninger) [#1164](https://github.com/preservim/nerdtree/pull/1164)
- **.5**: Fix highlight for file node. (pirey) [#1157](https://github.com/preservim/nerdtree/pull/1157)
- **.4**: Make sure symbolic links' flags are highlighted correctly. (PhilRunninger) [#1156](https://github.com/preservim/nerdtree/pull/1156)
- **.3**: Fix new NERDTrees' width when previous one was in the only window. (PhilRunninger) [#1153](https://github.com/preservim/nerdtree/pull/1153)

View File

@ -28,7 +28,9 @@ endfunction
" FUNCTION: s:Creator._broadcastInitEvent() {{{1
function! s:Creator._broadcastInitEvent()
silent doautocmd User NERDTreeInit
if exists('#NERDTreeInit')
doautocmd User NERDTreeInit
endif
endfunction
" FUNCTION: s:Creator.BufNamePrefix() {{{1

View File

@ -27,7 +27,9 @@ function! s:NERDTree.changeRoot(node)
call self.render()
call self.root.putCursorHere(0, 0)
silent doautocmd User NERDTreeNewRoot
if exists('#NERDTreeNewRoot')
doautocmd User NERDTreeNewRoot
endif
endfunction
"FUNCTION: s:NERDTree.Close() {{{1