Skip to content

Commit

Permalink
Rename the class method for sorting bookmarks
Browse files Browse the repository at this point in the history
A more intention-revealing name was chosen for the script-local sorting
function. The function comment was also rewritten.
  • Loading branch information
Jason Franklin committed May 26, 2017
1 parent 519436a commit 5aec5ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/nerdtree/bookmark.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function! s:Bookmark.AddBookmark(name, path)
endfor
call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path))
if g:NERDTreeBookmarksSort ==# 1
call s:Bookmark.Sort()
call s:Bookmark.SortBookmarksList()
endif
endfunction

Expand Down Expand Up @@ -105,7 +105,7 @@ function! s:Bookmark.CacheBookmarks(silent)
endif
endif
if g:NERDTreeBookmarksSort ==# 1
call s:Bookmark.Sort()
call s:Bookmark.SortBookmarksList()
endif
endif
endfunction
Expand Down Expand Up @@ -239,9 +239,9 @@ function! s:Bookmark.setPath(path)
let self.path = a:path
endfunction

" FUNCTION: Bookmark.Sort() {{{1
" Class method that sorts all bookmarks
function! s:Bookmark.Sort()
" FUNCTION: Bookmark.SortBookmarksList() {{{1
" Class method that sorts the global list of bookmarks by name.
function! s:Bookmark.SortBookmarksList()
let CompareFunc = function("nerdtree#compareBookmarks")
call sort(s:Bookmark.Bookmarks(), CompareFunc)
endfunction
Expand Down

0 comments on commit 5aec5ec

Please sign in to comment.