diff options
author | Daniel Jacobowitz <drow@false.org> | 2006-04-24 22:00:27 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2006-04-24 22:00:27 +0000 |
commit | 23e2f935d058f72a6dada4c83c740fd4e3dcc6ed (patch) | |
tree | 222dfd22cda9f7a158f58e9cb545f68c849dca98 /readline/macro.c | |
parent | 49b5a1f5dc74a0e693a51409252b3d590cc00bbb (diff) | |
download | binutils-readline_5_1-import-branch.zip binutils-readline_5_1-import-branch.tar.gz binutils-readline_5_1-import-branch.tar.bz2 |
Import readline 5.1 on the branch.readline_5_1-import-branch
Diffstat (limited to 'readline/macro.c')
-rw-r--r-- | readline/macro.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/readline/macro.c b/readline/macro.c index b73c3af..2975bf1 100644 --- a/readline/macro.c +++ b/readline/macro.c @@ -100,6 +100,8 @@ _rl_with_macro_input (string) int _rl_next_macro_key () { + int c; + if (rl_executing_macro == 0) return (0); @@ -109,7 +111,14 @@ _rl_next_macro_key () return (_rl_next_macro_key ()); } +#if defined (READLINE_CALLBACKS) + c = rl_executing_macro[executing_macro_index++]; + if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD) && rl_executing_macro[executing_macro_index] == 0) + _rl_pop_executing_macro (); + return c; +#else return (rl_executing_macro[executing_macro_index++]); +#endif } /* Save the currently executing macro on a stack of saved macros. */ |