summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-03 21:23:39 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-03 21:23:39 -0700
commitd2aac0db3dbabc163aad4722025db6051f56d804 (patch)
tree72cff9d5fadf539d25c51c84d9505e97fed86598 /lib.h
parent5249db385aa8434d19924457a83d8bb164d9fc96 (diff)
downloadtxr-d2aac0db3dbabc163aad4722025db6051f56d804.tar.gz
txr-d2aac0db3dbabc163aad4722025db6051f56d804.tar.bz2
txr-d2aac0db3dbabc163aad4722025db6051f56d804.zip
linenoise: bugfix: use persistent stream for non-tty.
This bug causes data to be thrown away after reading one line. * linenoise/linenoise.c (struct lino_state): New member, ifs. (linenoise): Do not fdopen a new stream on each call, because this will read a buffer full of data, from which it will just read one line, and then throw the rest of away when fclose is called on the stream. Open the stream once and store it in the ifs member. (lino_cleanup): If the ifs member is non-null, then call fclose on it.
Diffstat (limited to 'lib.h')
0 files changed, 0 insertions, 0 deletions