nimsuggest: make use project file name if none given for 'sug' command; allows for more convenient debugging

This commit is contained in:
Andreas Rumpf 2019-03-04 11:35:23 +01:00
commit 55bc29c761

View file

@ -437,10 +437,14 @@ proc execCmd(cmd: string; graph: ModuleGraph; cachedMsgs: CachedMsgs) =
else: err() else: err()
var dirtyfile = "" var dirtyfile = ""
var orig = "" var orig = ""
i = parseQuoted(cmd, orig, i) i += skipWhitespace(cmd, i)
if i < cmd.len and cmd[i] == ';': if i < cmd.len and cmd[i] in {'0'..'9'}:
i = parseQuoted(cmd, dirtyfile, i+1) orig = string conf.projectFull
i += skipWhile(cmd, seps, i) else:
i = parseQuoted(cmd, orig, i)
if i < cmd.len and cmd[i] == ';':
i = parseQuoted(cmd, dirtyfile, i+1)
i += skipWhile(cmd, seps, i)
var line = -1 var line = -1
var col = 0 var col = 0
i += parseInt(cmd, line, i) i += parseInt(cmd, line, i)