nimsuggest: filenames in quotes now work; general hints are not emitted
This commit is contained in:
parent
3ac2e00334
commit
ebda8e89e1
2 changed files with 6 additions and 5 deletions
|
|
@ -739,6 +739,9 @@ proc writeContext(lastinfo: TLineInfo) =
|
||||||
getMessageStr(errInstantiationFrom, "")])
|
getMessageStr(errInstantiationFrom, "")])
|
||||||
info = msgContext[i]
|
info = msgContext[i]
|
||||||
|
|
||||||
|
proc ignoreMsgBecauseOfIdeTools(msg: TMsgKind): bool =
|
||||||
|
msg >= errGenerated and gCmd == cmdIdeTools and optIdeDebug notin gGlobalOptions
|
||||||
|
|
||||||
proc rawMessage*(msg: TMsgKind, args: openArray[string]) =
|
proc rawMessage*(msg: TMsgKind, args: openArray[string]) =
|
||||||
var frmt: string
|
var frmt: string
|
||||||
case msg
|
case msg
|
||||||
|
|
@ -757,6 +760,7 @@ proc rawMessage*(msg: TMsgKind, args: openArray[string]) =
|
||||||
frmt = RawHintFormat
|
frmt = RawHintFormat
|
||||||
inc(gHintCounter)
|
inc(gHintCounter)
|
||||||
let s = `%`(frmt, `%`(msgKindToString(msg), args))
|
let s = `%`(frmt, `%`(msgKindToString(msg), args))
|
||||||
|
if not ignoreMsgBecauseOfIdeTools(msg):
|
||||||
msgWriteln(s)
|
msgWriteln(s)
|
||||||
handleError(msg, doAbort, s)
|
handleError(msg, doAbort, s)
|
||||||
|
|
||||||
|
|
@ -776,9 +780,6 @@ proc formatMsg*(info: TLineInfo, msg: TMsgKind, arg: string): string =
|
||||||
result = frmt % [toMsgFilename(info), coordToStr(info.line),
|
result = frmt % [toMsgFilename(info), coordToStr(info.line),
|
||||||
coordToStr(info.col), getMessageStr(msg, arg)]
|
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,
|
proc liMessage(info: TLineInfo, msg: TMsgKind, arg: string,
|
||||||
eh: TErrorHandling) =
|
eh: TErrorHandling) =
|
||||||
var frmt: string
|
var frmt: string
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ proc parseQuoted(cmd: string; outp: var string; start: int): int =
|
||||||
var i = start
|
var i = start
|
||||||
i += skipWhitespace(cmd, i)
|
i += skipWhitespace(cmd, i)
|
||||||
if cmd[i] == '"':
|
if cmd[i] == '"':
|
||||||
i += parseUntil(cmd, outp, '"', i+1)+1
|
i += parseUntil(cmd, outp, '"', i+1)+2
|
||||||
else:
|
else:
|
||||||
i += parseUntil(cmd, outp, seps, i)
|
i += parseUntil(cmd, outp, seps, i)
|
||||||
result = i
|
result = i
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue