From 29a321d061032df5b2ec347b6b4b778f665305a6 Mon Sep 17 00:00:00 2001 From: Phil Runninger Date: Wed, 15 Apr 2020 08:58:07 -0400 Subject: [PATCH] Put '%' argument in bufname() for backwards compatibility. (#1105) * Put '%' argument in bufname() for backwards compatibility. * Update version number in change log. --- CHANGELOG.md | 1 + lib/nerdtree/path.vim | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d744b3..d0de2be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) --> #### 6.7 +- **.7**: Put '%' argument in bufname() for backwards compatibility. (PhilRunninger) [#1105](https://github.com/preservim/nerdtree/pull/1105) - **.6**: If a file's already open in the window, don't edit it again. (PhilRunninger) [#1103](https://github.com/preservim/nerdtree/pull/1103) - **.5**: Prevent unneeded tree creation in `:NERDTreeToggle[VCS] ` (PhilRunninger) [#1101](https://github.com/preservim/nerdtree/pull/1101) - **.4**: Add missing calls to the `shellescape()` function (lifecrisis) [#1099](https://github.com/preservim/nerdtree/pull/1099) diff --git a/lib/nerdtree/path.vim b/lib/nerdtree/path.vim index 3158bbf..2ac8c71 100644 --- a/lib/nerdtree/path.vim +++ b/lib/nerdtree/path.vim @@ -296,7 +296,7 @@ endfunction " FUNCTION: Path.edit() {{{1 function! s:Path.edit() let l:bufname = self.str({'format': 'Edit'}) - if bufname() !=# l:bufname + if bufname('%') !=# l:bufname exec 'edit ' . l:bufname endif endfunction