diff --git a/compiler/tools/suggest.nim b/compiler/tools/suggest.nim index 3c097ae60cf..f6ed9aaa8f2 100644 --- a/compiler/tools/suggest.nim +++ b/compiler/tools/suggest.nim @@ -492,7 +492,9 @@ proc executeCmd*(cmd: IdeCmd, file, dirtyfile: AbsoluteFile, line, col: int; dirtyfile.isEmpty: discard "no need to recompile anything" else: - let modIdx = graph.parentModule(dirtyIdx) + var modIdx = graph.parentModule(dirtyIdx) + if modIdx == FileIndex(0): + modIdx = dirtyIdx graph.markDirty dirtyIdx graph.markClientsDirty dirtyIdx # partially recompiling the project means that that VM and JIT state