tell the user how many files couldnt be loaded

This commit is contained in:
Martin Grenfell
2008-07-20 01:06:00 +12:00
parent e819e13a5d
commit fe249e20b9

View File

@@ -848,7 +848,7 @@ function! s:oTreeDirNode.InitChildren(silent) dict
let path = s:oPath.New(i) let path = s:oPath.New(i)
call self.CreateChild(path, 0) call self.CreateChild(path, 0)
catch /^NERDTree.Path.\(InvalidArguments\|InvalidFiletype\)/ catch /^NERDTree.Path.\(InvalidArguments\|InvalidFiletype\)/
let invalidFilesFound = 1 let invalidFilesFound += 1
endtry endtry
endif endif
endfor endfor
@@ -860,7 +860,7 @@ function! s:oTreeDirNode.InitChildren(silent) dict
endif endif
if invalidFilesFound if invalidFilesFound
call s:EchoWarning("some files could not be loaded into the NERD tree") call s:EchoWarning(invalidFilesFound . " file(s) could not be loaded into the NERD tree")
endif endif
return self.GetChildCount() return self.GetChildCount()
endfunction endfunction