fix in using the linenoise function (#5351)
This commit is contained in:
parent
41d3660e3a
commit
ca39e113d5
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue