summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-11-20 13:57:27 -0800
committerAndreas Rumpf <rumpf_a@web.de>2018-11-20 22:57:27 +0100
commitfe2eb25650c731ec9590a583276945a4b70bdf39 (patch)
treedf8a4a0d76d04d0ef915aa5649ad36d647ae97bc
parentb4a42386d95b684e116a8a4149a6986054757bd4 (diff)
downloadNim-fe2eb25650c731ec9590a583276945a4b70bdf39.tar.gz
nimsuggest: fixes #96
-rw-r--r--nimsuggest/nimsuggest.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim
index 34b1cc4f7..d84cb6f17 100644
--- a/nimsuggest/nimsuggest.nim
+++ b/nimsuggest/nimsuggest.nim
@@ -186,7 +186,7 @@ proc execute(cmd: IdeCmd, file, dirtyfile: AbsoluteFile, line, col: int;
   if conf.suggestVersion == 1:
     graph.usageSym = nil
   if not isKnownFile:
-    graph.compileProject()
+    graph.compileProject(dirtyIdx)
   if conf.suggestVersion == 0 and conf.ideCmd in {ideUse, ideDus} and
       dirtyfile.isEmpty:
     discard "no need to recompile anything"
@@ -195,7 +195,8 @@ proc execute(cmd: IdeCmd, file, dirtyfile: AbsoluteFile, line, col: int;
     graph.markDirty dirtyIdx
     graph.markClientsDirty dirtyIdx
     if conf.ideCmd != ideMod:
-      graph.compileProject(modIdx)
+      if isKnownFile:
+        graph.compileProject(modIdx)
   if conf.ideCmd in {ideUse, ideDus}:
     let u = if conf.suggestVersion != 1: graph.symFromInfo(conf.m.trackPos) else: graph.usageSym
     if u != nil: