nimsuggest: sane dirty buffer handling

This commit is contained in:
Araq 2015-01-29 03:08:41 +01:00
commit 8710a37384
9 changed files with 51 additions and 56 deletions

View file

@ -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()