Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions autoload/nerdtree/ui_glue.vim
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ function! s:openNodeRecursively(node)
call nerdtree#echo("Recursively opening node. Please wait...")
call a:node.openRecursively()
call b:NERDTree.render()
redraw
call nerdtree#echo("Recursively opening node. Please wait... DONE")
redraw!
endfunction

" FUNCTION: s:previewBookmark(bookmark) {{{1
Expand Down Expand Up @@ -544,9 +543,8 @@ function! s:refreshRoot()
call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w")
call b:NERDTree.root.refresh()
call b:NERDTree.render()
redraw
redraw!
call nerdtree#exec(l:curWin . "wincmd w")
call nerdtree#echo("Refreshing the root node. This could take a while... DONE")
endfunction

" FUNCTION: s:refreshCurrent(node) {{{1
Expand All @@ -560,8 +558,7 @@ function! s:refreshCurrent(node)
call nerdtree#echo("Refreshing node. This could take a while...")
call node.refresh()
call b:NERDTree.render()
redraw
call nerdtree#echo("Refreshing node. This could take a while... DONE")
redraw!
endfunction

" FUNCTION: nerdtree#ui_glue#setupCommands() {{{1
Expand Down
12 changes: 4 additions & 8 deletions lib/nerdtree/tree_dir_node.vim
Original file line number Diff line number Diff line change
Expand Up @@ -405,17 +405,15 @@ endfunction
" Removes all childen from this node and re-reads them
"
" Args:
" silent: 1 if the function should not echo any "please wait" messages for
" large directories
"
" Return: the number of child nodes read
function! s:TreeDirNode._initChildren(silent)
function! s:TreeDirNode._initChildren()
"remove all the current child nodes
let self.children = []

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 ...")
endif

Expand All @@ -432,9 +430,7 @@ function! s:TreeDirNode._initChildren(silent)

call self.sortChildren()

if !a:silent && len(files) > g:NERDTreeNotificationThreshold
call nerdtree#echo("Please wait, caching a large dir ... DONE (". self.getChildCount() ." nodes cached).")
endif
redraw!

if invalidFilesFound
call nerdtree#echoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree")
Expand Down Expand Up @@ -494,7 +490,7 @@ function! s:TreeDirNode.open(...)

let l:numChildrenCached = 0
if empty(self.children)
let l:numChildrenCached = self._initChildren(0)
let l:numChildrenCached = self._initChildren
endif

return l:numChildrenCached
Expand Down