fix in using the linenoise function (#5351)

This commit is contained in:
Arne Döring
2017-02-08 10:25:57 +01:00
committed by Andreas Rumpf
parent 41d3660e3a
commit ca39e113d5

View File

@@ -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)