This commit is contained in:
Basile Burg 2017-01-29 00:51:45 +01:00
parent e9bc9d1776
commit d7a740fc01
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 5 additions and 4 deletions

View File

@ -40,7 +40,7 @@ void main(string[] args)
// even when files are passed, the std input has to be closed by the IDE // even when files are passed, the std input has to be closed by the IDE
foreach(ref buffer; stdin.byChunk(4096)) foreach(ref buffer; stdin.byChunk(4096))
source.put(buffer); source.put(buffer);
if (!source.data.length) if (!source.data.length && args.length > 1)
{ {
import std.file: exists; import std.file: exists;
files = args[1].splitter(pathSeparator).filter!exists.array; files = args[1].splitter(pathSeparator).filter!exists.array;
@ -82,7 +82,8 @@ void handleSymListOption()
void handleTodosOption() void handleTodosOption()
{ {
mixin(logCall); mixin(logCall);
getTodos(files); if (files.length)
getTodos(files);
} }
/// Handles the "-i" option: create the import list in the output /// Handles the "-i" option: create the import list in the output

View File

@ -420,8 +420,8 @@ begin
ctxt := getContext; ctxt := getContext;
case ctxt of case ctxt of
tcNone: exit; tcNone: exit;
tcProject: if fProj = nil then exit; tcProject: if (fProj = nil) or (fProj.sourcesCount = 0) then exit;
tcFile: if fProj = nil then exit; tcFile: if fDoc = nil then exit;
end; end;
if not exeInSysPath(ToolExeName) then if not exeInSysPath(ToolExeName) then
exit; exit;