From 928b730d1b6ee24e39c0ed5e6c5326f0c3f002a6 Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Sun, 24 May 2015 14:29:43 -0500 Subject: [PATCH 1/2] fixes #2694 --- compiler/nimsuggest/nimsuggest.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/nimsuggest/nimsuggest.nim b/compiler/nimsuggest/nimsuggest.nim index 3b4aa658d..b049899cb 100644 --- a/compiler/nimsuggest/nimsuggest.nim +++ b/compiler/nimsuggest/nimsuggest.nim @@ -118,7 +118,7 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int) = gTrackPos = newLineInfo(dirtyIdx, line, col) gErrorCounter = 0 - if not isKnownFile: + if isKnownFile: compileProject(dirtyIdx) else: compileProject() From 4cc722a41420e24f53a3a66be08e3b4a41b76d69 Mon Sep 17 00:00:00 2001 From: Simon Hafner Date: Sun, 24 May 2015 15:22:22 -0500 Subject: [PATCH 2/2] now nimsuggest works on the first sug --- compiler/nimsuggest/nimsuggest.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/nimsuggest/nimsuggest.nim b/compiler/nimsuggest/nimsuggest.nim index b049899cb..2c785d118 100644 --- a/compiler/nimsuggest/nimsuggest.nim +++ b/compiler/nimsuggest/nimsuggest.nim @@ -118,10 +118,9 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int) = gTrackPos = newLineInfo(dirtyIdx, line, col) gErrorCounter = 0 - if isKnownFile: - compileProject(dirtyIdx) - else: + if not isKnownFile: compileProject() + compileProject(dirtyIdx) proc executeEPC(cmd: IdeCmd, args: SexpNode) = let @@ -192,8 +191,6 @@ proc parseCmdLine(cmd: string) = execute(gIdeCmd, orig, dirtyfile, line, col-1) proc serve() = - # do not stop after the first error: - msgs.gErrorMax = high(int) case gMode: of mstdin: echo Help @@ -278,6 +275,9 @@ proc mainCommand = # current path is always looked first for modules prependStr(searchPaths, gProjectPath) + # do not stop after the first error: + msgs.gErrorMax = high(int) + compileProject() serve() proc processCmdLine*(pass: TCmdLinePass, cmd: string) =