diff options
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r-- | compiler/msgs.nim | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim index a1eaf23bb..b38d67b55 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -526,13 +526,17 @@ proc SuggestWriteln*(s: string) = else: Writeln(stdout, s) stdoutSocket.send(s & "\c\L") - + proc SuggestQuit*() = - if not isServing: quit(0) - elif not isNil(stdoutSocket): - stdoutSocket.send("\c\L") + if not isServing: + quit(0) + elif isWorkingWithDirtyBuffer: + # No need to compile the rest if we are working with a + # throw-away buffer. Incomplete dot expressions frequently + # found in dirty buffers will result in errors few steps + # from now anyway. raise newException(ESuggestDone, "suggest done") - + # this format is understood by many text editors: it is the same that # Borland and Freepascal use const |