Put '%' argument in bufname() for backwards compatibility. (#1105)

* Put '%' argument in bufname() for backwards compatibility.

* Update version number in change log.
This commit is contained in:
Phil Runninger 2020-04-15 08:58:07 -04:00 committed by GitHub
parent 0257d64248
commit 29a321d061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
--> -->
#### 6.7 #### 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) - **.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] <path>` (PhilRunninger) [#1101](https://github.com/preservim/nerdtree/pull/1101) - **.5**: Prevent unneeded tree creation in `:NERDTreeToggle[VCS] <path>` (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) - **.4**: Add missing calls to the `shellescape()` function (lifecrisis) [#1099](https://github.com/preservim/nerdtree/pull/1099)

View File

@ -296,7 +296,7 @@ endfunction
" FUNCTION: Path.edit() {{{1 " FUNCTION: Path.edit() {{{1
function! s:Path.edit() function! s:Path.edit()
let l:bufname = self.str({'format': 'Edit'}) let l:bufname = self.str({'format': 'Edit'})
if bufname() !=# l:bufname if bufname('%') !=# l:bufname
exec 'edit ' . l:bufname exec 'edit ' . l:bufname
endif endif
endfunction endfunction