diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-10-12 20:06:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-10-12 20:06:43 -0700 |
commit | 7736be0fad0ce7805e7fe90eb12c9689b03d34a2 (patch) | |
tree | 5853e0a44003d2106fa378354dfd7a22f444a723 /parser.c | |
parent | d367c9e2fb84ec6d4a13faf18375dacefaa6fdc9 (diff) | |
download | txr-7736be0fad0ce7805e7fe90eb12c9689b03d34a2.tar.gz txr-7736be0fad0ce7805e7fe90eb12c9689b03d34a2.tar.bz2 txr-7736be0fad0ce7805e7fe90eb12c9689b03d34a2.zip |
listener: put each result into linenoise.
* parser.c (repl): After each successful command that
produces a value, not only print the value but also
call lino_set_result to install its string representation
into the linenoise object, so it is available for insertion
via Ctrl-X Ctrl-P.
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -771,6 +771,7 @@ val repl(val bindings, val in_stream, val out_stream) reg_varl(var_sym, value); sethash(result_hash, var_counter, value); prinl(value, out_stream); + lino_set_result(ls, utf8_dup_to(c_str(tostring(value)))); lino_hist_add(ls, line_u8); } } |