@@ -243,7 +243,7 @@ endfunction
243243function !  s: displayHelp
244244    let  b: treeShowHelp=  b: treeShowHelp0  : 1 
245245    call  b: NERDTreerender ()
246-     call  nerdtree# centerView
246+     call  b: NERDTree .ui. centerView ()
247247endfunction 
248248
249249"  FUNCTION:  s:findAndRevealPath() {{{1
@@ -372,7 +372,7 @@ function! s:jumpToChild(currentNode, direction)
372372
373373    call  targetNode.putCursorHere (1 , 0 )
374374
375-     call  nerdtree# centerView
375+     call  b: NERDTree .ui. centerView ()
376376endfunction 
377377
378378
@@ -400,7 +400,7 @@ endfunction
400400function !  s: jumpToParent
401401    if  ! empty (a: node
402402        call  a: nodeputCursorHere (1 , 0 )
403-         call  nerdtree# centerView
403+         call  b: NERDTree .ui. centerView ()
404404    else 
405405        call  nerdtree#echo (" cannot jump to parent" 
406406    endif 
@@ -410,7 +410,7 @@ endfunction
410410"  moves the cursor to the root node
411411function !  s: jumpToRoot
412412    call  b: NERDTreeRootputCursorHere (1 , 0 )
413-     call  nerdtree# centerView
413+     call  b: NERDTree .ui. centerView ()
414414endfunction 
415415
416416"  FUNCTION:  s:jumpToNextSibling(node) {{{1
@@ -434,7 +434,7 @@ function! s:jumpToSibling(currentNode, forward)
434434
435435    if  ! empty (sibling)
436436        call  sibling.putCursorHere (1 , 0 )
437-         call  nerdtree# centerView
437+         call  b: NERDTree .ui. centerView ()
438438    endif 
439439endfunction 
440440
@@ -570,53 +570,29 @@ function! s:showMenu(node)
570570endfunction 
571571
572572"  FUNCTION:  s:toggleIgnoreFilter() {{{1
573- "  toggles the use of the NERDTreeIgnore option
574573function !  s: toggleIgnoreFilter
575-     let  b: NERDTreeIgnoreEnabled=  ! b: NERDTreeIgnoreEnabled
576-     call  b: NERDTreerenderViewSavingPosition ()
577-     call  nerdtree#centerView ()
574+     call  b: NERDTreetoggleIgnoreFilter ()
578575endfunction 
579576
580577"  FUNCTION:  s:toggleShowBookmarks() {{{1
581- "  toggles the display of bookmarks
582578function !  s: toggleShowBookmarks
583-     let  b: NERDTreeShowBookmarks=  ! b: NERDTreeShowBookmarks
584-     if  b: NERDTreeShowBookmarks
585-         call  b: NERDTreerender ()
586-         call  nerdtree#putCursorOnBookmarkTable ()
587-     else 
588-         call  b: NERDTreerenderViewSavingPosition ()
589-     endif 
590-     call  nerdtree#centerView ()
579+     call  b: NERDTreetoggleShowBookmarks ()
591580endfunction 
592581
593582"  FUNCTION:  s:toggleShowFiles() {{{1
594- "  toggles the display of hidden files
595583function !  s: toggleShowFiles
596-     let  b: NERDTreeShowFiles=  ! b: NERDTreeShowFiles
597-     call  b: NERDTreerenderViewSavingPosition ()
598-     call  nerdtree#centerView ()
584+     call  b: NERDTreetoggleShowFiles ()
599585endfunction 
600586
601587"  FUNCTION:  s:toggleShowHidden() {{{1
602588"  toggles the display of hidden files
603589function !  s: toggleShowHidden
604-     let  b: NERDTreeShowHidden=  ! b: NERDTreeShowHidden
605-     call  b: NERDTreerenderViewSavingPosition ()
606-     call  nerdtree#centerView ()
590+     call  b: NERDTreetoggleShowHidden ()
607591endfunction 
608592
609593"  FUNCTION:  s:toggleZoom() {{{1
610- "  zoom (maximize/minimize) the NERDTree window
611594function !  s: toggleZoom
612-     if  exists (" b:NERDTreeZoomed" &&  b: NERDTreeZoomed
613-         let  size =  exists (" b:NERDTreeOldWindowSize" b: NERDTreeOldWindowSizeg: NERDTreeWinSize
614-         exec  " silent vertical resize " 
615-         let  b: NERDTreeZoomed=  0 
616-     else 
617-         exec  " vertical resize" 
618-         let  b: NERDTreeZoomed=  1 
619-     endif 
595+     call  b: NERDTreetoggleZoom ()
620596endfunction 
621597
622598" FUNCTION:  nerdtree#ui_glue#upDir(keepState) {{{1
0 commit comments