Merge pull request #866 from lifecrisis/bm_toggle

This commit is contained in:
Jason Franklin 2018-08-03 14:04:57 -04:00 committed by GitHub
commit 43d569195c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,15 +475,23 @@ function! s:UI.toggleIgnoreFilter()
endfunction
" FUNCTION: s:UI.toggleShowBookmarks() {{{1
" toggles the display of bookmarks
" Toggle the visibility of the Bookmark table.
function! s:UI.toggleShowBookmarks()
let self._showBookmarks = !self._showBookmarks
if self.getShowBookmarks()
call self.nerdtree.render()
call g:NERDTree.CursorToBookmarkTable()
else
if empty(g:NERDTreeFileNode.GetSelected())
call b:NERDTree.root.putCursorHere(0, 0)
normal! 0
endif
call self.renderViewSavingPosition()
endif
call self.centerView()
endfunction