make basic debugging possible

This commit is contained in:
Arne Döring 2018-06-26 01:42:36 +02:00
commit ba3c6d022b
3 changed files with 9 additions and 9 deletions

View file

@ -155,10 +155,10 @@ proc getInfoContext*(conf: ConfigRef; index: int): TLineInfo =
else: result = conf.m.msgContext[i]
template toFilename*(conf: ConfigRef; fileIdx: FileIndex): string =
(if fileIdx.int32 < 0: "???" else: conf.m.fileInfos[fileIdx.int32].projPath)
(if fileIdx.int32 < 0 or conf == nil: "???" else: conf.m.fileInfos[fileIdx.int32].projPath)
proc toFullPath*(conf: ConfigRef; fileIdx: FileIndex): string =
if fileIdx.int32 < 0: result = "???"
if fileIdx.int32 < 0 or conf == nil: result = "???"
else: result = conf.m.fileInfos[fileIdx.int32].fullPath
proc setDirtyFile*(conf: ConfigRef; fileIdx: FileIndex; filename: string) =