From 6b5d70e5bf307bd84fec90ba77fa661036ff0361 Mon Sep 17 00:00:00 2001 From: Phil Runninger Date: Sun, 9 Aug 2020 07:07:55 -0400 Subject: [PATCH] Fix argument of exists() function calls checking for autocommands. (#1165) * Fix syntax of exists function calls checking for autocommands. * Update version number in change log. --- CHANGELOG.md | 1 + lib/nerdtree/creator.vim | 2 +- lib/nerdtree/nerdtree.vim | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61f0111..4a6e454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> #### 6.9 +- **.7**: Fix argument of `exists()` function calls checking for autocommands. (PhilRunninger) [#1165](https://github.com/preservim/nerdtree/pull/1165) - **.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) diff --git a/lib/nerdtree/creator.vim b/lib/nerdtree/creator.vim index 4f0a7dc..4a98413 100644 --- a/lib/nerdtree/creator.vim +++ b/lib/nerdtree/creator.vim @@ -28,7 +28,7 @@ endfunction " FUNCTION: s:Creator._broadcastInitEvent() {{{1 function! s:Creator._broadcastInitEvent() - if exists('#NERDTreeInit') + if exists('#User#NERDTreeInit') doautocmd User NERDTreeInit endif endfunction diff --git a/lib/nerdtree/nerdtree.vim b/lib/nerdtree/nerdtree.vim index ed060f6..db9e2b5 100644 --- a/lib/nerdtree/nerdtree.vim +++ b/lib/nerdtree/nerdtree.vim @@ -27,7 +27,7 @@ function! s:NERDTree.changeRoot(node) call self.render() call self.root.putCursorHere(0, 0) - if exists('#NERDTreeNewRoot') + if exists('#User#NERDTreeNewRoot') doautocmd User NERDTreeNewRoot endif endfunction