mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
fix in using the linenoise function (#5351)
This commit is contained in:
committed by
Andreas Rumpf
parent
41d3660e3a
commit
ca39e113d5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user