mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-27 10:59:30 +08:00
fix caching bug for s:oPath.BookmarkNames()
This commit is contained in:
parent
b1020ad9c8
commit
c463234452
|
@ -990,7 +990,7 @@ endfunction
|
|||
let s:oPath = {}
|
||||
"FUNCTION: oPath.BookmarkNames() {{{3
|
||||
function! s:oPath.BookmarkNames() dict
|
||||
if !exists("self.bookmark")
|
||||
if !exists("self.bookmarkNames")
|
||||
call self.CacheDisplayString()
|
||||
endif
|
||||
return self.bookmarkNames
|
||||
|
@ -1003,14 +1003,14 @@ function! s:oPath.CacheDisplayString() dict
|
|||
let self.cachedDisplayString = self.cachedDisplayString . '*'
|
||||
endif
|
||||
|
||||
let bookmarkNames = []
|
||||
let self.bookmarkNames = []
|
||||
for i in s:oBookmark.Bookmarks()
|
||||
if i.path.Equals(self)
|
||||
call add(bookmarkNames, i.name)
|
||||
call add(self.bookmarkNames, i.name)
|
||||
endif
|
||||
endfor
|
||||
if !empty(bookmarkNames)
|
||||
let self.cachedDisplayString .= ' {' . join(bookmarkNames) . '}'
|
||||
if !empty(self.bookmarkNames)
|
||||
let self.cachedDisplayString .= ' {' . join(self.bookmarkNames) . '}'
|
||||
endif
|
||||
|
||||
if self.isSymLink
|
||||
|
|
Loading…
Reference in New Issue
Block a user