summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-08-07 18:58:46 +0300
committerZahary Karadjov <zahary@gmail.com>2013-08-07 18:58:46 +0300
commit5dfc0d0d19c122ac88bc421c1130a6030c253ae8 (patch)
tree849f0ab9355df5982b1806de74976ed700909323 /compiler/msgs.nim
parent06b3852143b2f3857da0090b9c18ac63812ec3cc (diff)
downloadNim-5dfc0d0d19c122ac88bc421c1130a6030c253ae8.tar.gz
Take into account dirty buffers in suggest output; Fixes zah/nimrod.vim#14
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r--compiler/msgs.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 711a3c733..73481940c 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -413,7 +413,7 @@ type
   TFileInfo*{.final.} = object 
     fullPath*: string          # This is a canonical full filesystem path
     projPath*: string          # This is relative to the project's root
-    
+    shortName*: string         # short name of the module
     quotedName*: PRope         # cached quoted short name for codegen
                                # purpoes
     
@@ -473,7 +473,9 @@ proc newFileInfo(fullPath, projPath: string): TFileInfo =
   #shallow(result.fullPath)
   result.projPath = projPath
   #shallow(result.projPath)
-  result.quotedName = projPath.extractFilename.makeCString
+  let fileName = projPath.extractFilename
+  result.shortName = fileName.changeFileExt("")
+  result.quotedName = fileName.makeCString
   if optEmbedOrigSrc in gGlobalOptions or true:
     result.lines = @[]