diff options
author | Arne Döring <arne.doering@gmx.net> | 2017-02-08 10:25:57 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-02-08 10:25:57 +0100 |
commit | ca39e113d5d237f239f2334eaa5cab3c8efac979 (patch) | |
tree | 76ecbd04bfd49c843c1079fc8b5c89dbf738a286 /lib/impure | |
parent | 41d3660e3a0af7d4d69c41a4fef4c9f0c4ee376b (diff) | |
download | Nim-ca39e113d5d237f239f2334eaa5cab3c8efac979.tar.gz |
fix in using the linenoise function (#5351)
Diffstat (limited to 'lib/impure')
-rw-r--r-- | lib/impure/rdstdin.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/impure/rdstdin.nim b/lib/impure/rdstdin.nim index f722a6b39..b06e8de6c 100644 --- a/lib/impure/rdstdin.nim +++ b/lib/impure/rdstdin.nim @@ -116,7 +116,8 @@ else: tags: [ReadIOEffect, WriteIOEffect].} = var buffer = linenoise.readLine(prompt) if isNil(buffer): - raise newException(IOError, "Linenoise returned nil") + line.string.setLen(0) + return false line = TaintedString($buffer) if line.string.len > 0: historyAdd(buffer) |