mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-10 04:13:48 -05:00
Rename the class method for sorting bookmarks
A more intention-revealing name was chosen for the script-local sorting function. The function comment was also rewritten.
This commit is contained in:
@@ -20,7 +20,7 @@ function! s:Bookmark.AddBookmark(name, path)
|
|||||||
endfor
|
endfor
|
||||||
call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path))
|
call add(s:Bookmark.Bookmarks(), s:Bookmark.New(a:name, a:path))
|
||||||
if g:NERDTreeBookmarksSort ==# 1
|
if g:NERDTreeBookmarksSort ==# 1
|
||||||
call s:Bookmark.Sort()
|
call s:Bookmark.SortBookmarksList()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ function! s:Bookmark.CacheBookmarks(silent)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if g:NERDTreeBookmarksSort ==# 1
|
if g:NERDTreeBookmarksSort ==# 1
|
||||||
call s:Bookmark.Sort()
|
call s:Bookmark.SortBookmarksList()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@@ -239,9 +239,9 @@ function! s:Bookmark.setPath(path)
|
|||||||
let self.path = a:path
|
let self.path = a:path
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: Bookmark.Sort() {{{1
|
" FUNCTION: Bookmark.SortBookmarksList() {{{1
|
||||||
" Class method that sorts all bookmarks
|
" Class method that sorts the global list of bookmarks by name.
|
||||||
function! s:Bookmark.Sort()
|
function! s:Bookmark.SortBookmarksList()
|
||||||
let CompareFunc = function("nerdtree#compareBookmarks")
|
let CompareFunc = function("nerdtree#compareBookmarks")
|
||||||
call sort(s:Bookmark.Bookmarks(), CompareFunc)
|
call sort(s:Bookmark.Bookmarks(), CompareFunc)
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user