diff options
author | Sanne Wouda <sanne.wouda@gmail.com> | 2015-04-05 20:07:17 +0200 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2015-04-19 16:56:48 -0700 |
commit | 32936b0eb95c9cee54d3887328e4bfd01c961922 (patch) | |
tree | dfbaf159a3f6d20acaa4ab9de3515c76feb64ee4 /builtin_commandline.cpp | |
parent | 3559f20c8ffca8b036ff4aa6833e9e4c67eea7fc (diff) |
Change lookahead_list into a queue
Using builtin `commandline -f`, one would expect to have commands executed in
the order that they were given. This motivates the change to a queue.
Unfortunately, fish internals still need lookahead_list to act as a stack. Add
and rename functions to support both cases and have lookahead_list as
a std::deque internally.
This code is delicate, and we should probably dog-food this in nightly for
a while before the next-minor release.
Fixes #1567
Diffstat (limited to 'builtin_commandline.cpp')
-rw-r--r-- | builtin_commandline.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin_commandline.cpp b/builtin_commandline.cpp index 7f576aff..339cb0d1 100644 --- a/builtin_commandline.cpp +++ b/builtin_commandline.cpp @@ -455,10 +455,10 @@ static int builtin_commandline(parser_t &parser, wchar_t **argv) { /* input_unreadch inserts the specified keypress or - readline function at the top of the stack of unused + readline function at the back of the queue of unused keypresses */ - input_unreadch(c); + input_queue_ch(c); } else { |