Reset terminal colors before running compiled program
This commit is contained in:
parent
7d1a58224e
commit
db5f8d6755
2 changed files with 6 additions and 0 deletions
|
|
@ -378,3 +378,4 @@ proc mainCommand* =
|
||||||
when SimulateCaasMemReset:
|
when SimulateCaasMemReset:
|
||||||
resetMemory()
|
resetMemory()
|
||||||
|
|
||||||
|
resetAttributes()
|
||||||
|
|
|
||||||
|
|
@ -865,6 +865,11 @@ proc rawMessage*(msg: TMsgKind, args: openArray[string]) =
|
||||||
proc rawMessage*(msg: TMsgKind, arg: string) =
|
proc rawMessage*(msg: TMsgKind, arg: string) =
|
||||||
rawMessage(msg, [arg])
|
rawMessage(msg, [arg])
|
||||||
|
|
||||||
|
proc resetAttributes* =
|
||||||
|
if optUseColors in gGlobalOptions:
|
||||||
|
terminal.resetAttributes()
|
||||||
|
stdout.flushFile()
|
||||||
|
|
||||||
proc writeSurroundingSrc(info: TLineInfo) =
|
proc writeSurroundingSrc(info: TLineInfo) =
|
||||||
const indent = " "
|
const indent = " "
|
||||||
msgWriteln(indent & $info.sourceLine)
|
msgWriteln(indent & $info.sourceLine)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue