summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-29 01:09:27 +0100
committerAraq <rumpf_a@web.de>2015-01-29 01:39:53 +0100
commitebda8e89e15e3af88822fb2dd57c108830609ec6 (patch)
treea0d1a7be1cf732f9a81975319aa8cc12ab5c78ab /compiler
parent3ac2e003345878d6e6f55f9f5768e4a488acfe6e (diff)
downloadNim-ebda8e89e15e3af88822fb2dd57c108830609ec6.tar.gz
nimsuggest: filenames in quotes now work; general hints are not emitted
Diffstat (limited to 'compiler')
-rw-r--r--compiler/msgs.nim9
-rw-r--r--compiler/nimsuggest/nimsuggest.nim2
2 files changed, 6 insertions, 5 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index e19e6f618..fff5638da 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -739,6 +739,9 @@ proc writeContext(lastinfo: TLineInfo) =
                                      getMessageStr(errInstantiationFrom, "")])
     info = msgContext[i]
 
+proc ignoreMsgBecauseOfIdeTools(msg: TMsgKind): bool =
+  msg >= errGenerated and gCmd == cmdIdeTools and optIdeDebug notin gGlobalOptions
+
 proc rawMessage*(msg: TMsgKind, args: openArray[string]) = 
   var frmt: string
   case msg
@@ -757,7 +760,8 @@ proc rawMessage*(msg: TMsgKind, args: openArray[string]) =
     frmt = RawHintFormat
     inc(gHintCounter)
   let s = `%`(frmt, `%`(msgKindToString(msg), args))
-  msgWriteln(s)
+  if not ignoreMsgBecauseOfIdeTools(msg):
+    msgWriteln(s)
   handleError(msg, doAbort, s)
 
 proc rawMessage*(msg: TMsgKind, arg: string) = 
@@ -776,9 +780,6 @@ proc formatMsg*(info: TLineInfo, msg: TMsgKind, arg: string): string =
   result = frmt % [toMsgFilename(info), coordToStr(info.line),
                    coordToStr(info.col), getMessageStr(msg, arg)]
 
-proc ignoreMsgBecauseOfIdeTools(msg: TMsgKind): bool =
-  msg >= errGenerated and gCmd == cmdIdeTools and optIdeDebug notin gGlobalOptions
-
 proc liMessage(info: TLineInfo, msg: TMsgKind, arg: string, 
                eh: TErrorHandling) =
   var frmt: string
diff --git a/compiler/nimsuggest/nimsuggest.nim b/compiler/nimsuggest/nimsuggest.nim
index b9d167beb..3a447effb 100644
--- a/compiler/nimsuggest/nimsuggest.nim
+++ b/compiler/nimsuggest/nimsuggest.nim
@@ -46,7 +46,7 @@ proc parseQuoted(cmd: string; outp: var string; start: int): int =
   var i = start
   i += skipWhitespace(cmd, i)
   if cmd[i] == '"':
-    i += parseUntil(cmd, outp, '"', i+1)+1
+    i += parseUntil(cmd, outp, '"', i+1)+2
   else:
     i += parseUntil(cmd, outp, seps, i)
   result = i