diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2006-04-20 20:05:52 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2006-04-20 20:05:52 +0000 |
commit | b585a9fad59f9d0c07681778b97d36b67bd9748d (patch) | |
tree | d809e30a40f38fd19b05d2cbd920187e84108432 /readline/macro.c | |
parent | 84041b4c47edb0461f3b82afb77ca2d81819ebfa (diff) | |
download | gdb-b585a9fad59f9d0c07681778b97d36b67bd9748d.zip gdb-b585a9fad59f9d0c07681778b97d36b67bd9748d.tar.gz gdb-b585a9fad59f9d0c07681778b97d36b67bd9748d.tar.bz2 |
import of readlilne 5.1FSF
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. */ |