diff options
Diffstat (limited to 'nimsuggest/nimsuggest.nim')
-rw-r--r-- | nimsuggest/nimsuggest.nim | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim index 64d2dedc8..e69731b27 100644 --- a/nimsuggest/nimsuggest.nim +++ b/nimsuggest/nimsuggest.nim @@ -839,7 +839,7 @@ proc findSymDataInRange(graph: ModuleGraph, file: AbsoluteFile; startLine, start proc markDirtyIfNeeded(graph: ModuleGraph, file: string, originalFileIdx: FileIndex) = let sha = $sha1.secureHashFile(file) - if graph.config.m.fileInfos[originalFileIdx.int32].hash != sha or graph.config.ideCmd == ideSug: + if graph.config.m.fileInfos[originalFileIdx.int32].hash != sha or graph.config.ideCmd in {ideSug, ideCon}: myLog fmt "{file} changed compared to last compilation" graph.markDirty originalFileIdx graph.markClientsDirty originalFileIdx @@ -1000,7 +1000,6 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile, conf.m.trackPosAttached = false else: conf.m.trackPos = default(TLineInfo) - if cmd != ideCon: #ideCon is recompiled below graph.recompilePartially(fileIndex) case cmd @@ -1037,14 +1036,13 @@ proc executeNoHooksV3(cmd: IdeCmd, file: AbsoluteFile, dirtyfile: AbsoluteFile, graph.recompileFullProject() of ideChanged: graph.markDirtyIfNeeded(file.string, fileIndex) - of ideSug: - # ideSug performs partial build of the file, thus mark it dirty for the + of ideSug, ideCon: + # ideSug/ideCon performs partial build of the file, thus mark it dirty for the # future calls. graph.markDirtyIfNeeded(file.string, fileIndex) - of ideCon: - graph.markDirty fileIndex - graph.markClientsDirty fileIndex - graph.recompilePartially(fileIndex) + graph.recompilePartially(fileIndex) + let m = graph.getModule fileIndex + incl m.flags, sfDirty of ideOutline: let n = parseFile(fileIndex, graph.cache, graph.config) graph.iterateOutlineNodes(n, graph.fileSymbols(fileIndex).deduplicateSymInfoPair) |