Remove the "Please wait... DONE" messages. (#966)

This commit is contained in:
Phil Runninger 2019-03-25 22:29:21 -04:00 committed by GitHub
parent 288669db1f
commit 0efbdfbc5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 14 deletions

View File

@ -492,8 +492,7 @@ function! s:openNodeRecursively(node)
call nerdtree#echo("Recursively opening node. Please wait...") call nerdtree#echo("Recursively opening node. Please wait...")
call a:node.openRecursively() call a:node.openRecursively()
call b:NERDTree.render() call b:NERDTree.render()
redraw redraw!
call nerdtree#echo("Recursively opening node. Please wait... DONE")
endfunction endfunction
" FUNCTION: s:previewBookmark(bookmark) {{{1 " FUNCTION: s:previewBookmark(bookmark) {{{1
@ -544,9 +543,8 @@ function! s:refreshRoot()
call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w") call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w")
call b:NERDTree.root.refresh() call b:NERDTree.root.refresh()
call b:NERDTree.render() call b:NERDTree.render()
redraw redraw!
call nerdtree#exec(l:curWin . "wincmd w") call nerdtree#exec(l:curWin . "wincmd w")
call nerdtree#echo("Refreshing the root node. This could take a while... DONE")
endfunction endfunction
" FUNCTION: s:refreshCurrent(node) {{{1 " FUNCTION: s:refreshCurrent(node) {{{1
@ -560,8 +558,7 @@ function! s:refreshCurrent(node)
call nerdtree#echo("Refreshing node. This could take a while...") call nerdtree#echo("Refreshing node. This could take a while...")
call node.refresh() call node.refresh()
call b:NERDTree.render() call b:NERDTree.render()
redraw redraw!
call nerdtree#echo("Refreshing node. This could take a while... DONE")
endfunction endfunction
" FUNCTION: nerdtree#ui_glue#setupCommands() {{{1 " FUNCTION: nerdtree#ui_glue#setupCommands() {{{1

View File

@ -405,17 +405,15 @@ endfunction
" Removes all childen from this node and re-reads them " Removes all childen from this node and re-reads them
" "
" Args: " Args:
" silent: 1 if the function should not echo any "please wait" messages for
" large directories
" "
" Return: the number of child nodes read " Return: the number of child nodes read
function! s:TreeDirNode._initChildren(silent) function! s:TreeDirNode._initChildren()
"remove all the current child nodes "remove all the current child nodes
let self.children = [] let self.children = []
let files = self._glob('*', 1) + self._glob('.*', 0) let files = self._glob('*', 1) + self._glob('.*', 0)
if !a:silent && len(files) > g:NERDTreeNotificationThreshold if len(files) > g:NERDTreeNotificationThreshold
call nerdtree#echo("Please wait, caching a large dir ...") call nerdtree#echo("Please wait, caching a large dir ...")
endif endif
@ -432,9 +430,7 @@ function! s:TreeDirNode._initChildren(silent)
call self.sortChildren() call self.sortChildren()
if !a:silent && len(files) > g:NERDTreeNotificationThreshold redraw!
call nerdtree#echo("Please wait, caching a large dir ... DONE (". self.getChildCount() ." nodes cached).")
endif
if invalidFilesFound if invalidFilesFound
call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree") call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree")
@ -494,7 +490,7 @@ function! s:TreeDirNode.open(...)
let l:numChildrenCached = 0 let l:numChildrenCached = 0
if empty(self.children) if empty(self.children)
let l:numChildrenCached = self._initChildren(0) let l:numChildrenCached = self._initChildren
endif endif
return l:numChildrenCached return l:numChildrenCached