Skip to content

Commit

Permalink
update bookmarks when moving via filesystem menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Grenfell committed Jul 13, 2008
1 parent c463234 commit f404cdd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions plugin/NERD_tree.vim
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,11 @@ function! s:oBookmark.New(name, path) dict
let newBookmark.path = a:path
return newBookmark
endfunction
" Function: oBookmark.SetPath(path) {{{3
" makes this bookmark point to the given path
function! s:oBookmark.SetPath(path) dict
let self.path = a:path
endfunction
" Function: oBookmark.Sort() {{{3
" Class method that sorts all bookmarks
function! s:oBookmark.Sort() dict
Expand Down Expand Up @@ -1400,6 +1405,12 @@ function! s:oPath.Rename(newPath) dict
throw "NERDTree.Path.Rename Exception: Could not rename: '" . self.StrForOS(0) . "'" . 'to:' . a:newPath
endif
call self.ReadInfoFromDisk(a:newPath)

for i in self.BookmarkNames()
let b = s:oBookmark.BookmarkFor(i)
call b.SetPath(copy(self))
endfor
call s:oBookmark.Write()
endfunction

"FUNCTION: oPath.Str(esc) {{{3
Expand Down

0 comments on commit f404cdd

Please sign in to comment.