now nimsuggest works on the first sug

This commit is contained in:
Simon Hafner 2015-05-24 15:22:22 -05:00
commit 4cc722a414

View file

@ -118,10 +118,9 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int) =
gTrackPos = newLineInfo(dirtyIdx, line, col) gTrackPos = newLineInfo(dirtyIdx, line, col)
gErrorCounter = 0 gErrorCounter = 0
if isKnownFile: if not isKnownFile:
compileProject(dirtyIdx)
else:
compileProject() compileProject()
compileProject(dirtyIdx)
proc executeEPC(cmd: IdeCmd, args: SexpNode) = proc executeEPC(cmd: IdeCmd, args: SexpNode) =
let let
@ -192,8 +191,6 @@ proc parseCmdLine(cmd: string) =
execute(gIdeCmd, orig, dirtyfile, line, col-1) execute(gIdeCmd, orig, dirtyfile, line, col-1)
proc serve() = proc serve() =
# do not stop after the first error:
msgs.gErrorMax = high(int)
case gMode: case gMode:
of mstdin: of mstdin:
echo Help echo Help
@ -278,6 +275,9 @@ proc mainCommand =
# current path is always looked first for modules # current path is always looked first for modules
prependStr(searchPaths, gProjectPath) prependStr(searchPaths, gProjectPath)
# do not stop after the first error:
msgs.gErrorMax = high(int)
compileProject()
serve() serve()
proc processCmdLine*(pass: TCmdLinePass, cmd: string) = proc processCmdLine*(pass: TCmdLinePass, cmd: string) =