If a file's already open in the window, don't edit it again. (#1103)

* If a file's already open in the window, don't edit it again.

* Update version number in change log.

* Make only one call to self.str().
This commit is contained in:
Phil Runninger
2020-04-15 00:55:13 -04:00
committed by GitHub
parent 2d7cb043d4
commit 0257d64248
2 changed files with 6 additions and 2 deletions

View File

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