diff options
Diffstat (limited to 'compiler/main.nim')
-rw-r--r-- | compiler/main.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main.nim b/compiler/main.nim index 4cf9adc0d..06dcad7b0 100644 --- a/compiler/main.nim +++ b/compiler/main.nim @@ -169,9 +169,9 @@ proc commandSuggest = # cache in a state where "no recompilation is necessary", but the # cgen pass was never executed at all. commandCompileToC() - if gDirtyBufferIdx != 0: - discard compileModule(gDirtyBufferIdx, {sfDirty}) - resetModule(gDirtyBufferIdx) + let gDirtyBufferIdx = gTrackPos.fileIndex + discard compileModule(gDirtyBufferIdx, {sfDirty}) + resetModule(gDirtyBufferIdx) else: msgs.gErrorMax = high(int) # do not stop after first error semanticPasses() |