Instantize the character event queue

Wrap this stuff up in structs so it's no longer global.
This commit is contained in:
ridiculousfish
2019-06-02 15:41:23 -07:00
parent 6c1d29e14d
commit a48dbf23b8
9 changed files with 177 additions and 138 deletions

View File

@@ -326,9 +326,8 @@ int builtin_commandline(parser_t &parser, io_streams_t &streams, wchar_t **argv)
for (i = w.woptind; i < argc; i++) {
if (auto mc = input_function_get_code(argv[i])) {
// input_unreadch inserts the specified keypress or readline function at the back of
// the queue of unused keypresses.
input_queue_ch(*mc);
// Inserts the readline function at the back of the queue.
reader_queue_ch(*mc);
} else {
streams.err.append_format(_(L"%ls: Unknown input function '%ls'"), cmd, argv[i]);
builtin_print_error_trailer(parser, streams.err, cmd);