diff options
author | ache <ache@FreeBSD.org> | 2006-03-27 22:47:12 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2006-03-27 22:47:12 +0000 |
commit | 8aeb9782f4a5d98c23b918bdae2477810088d0d1 (patch) | |
tree | 5e38d670d1899750fd24e8f171fd03d714ab0681 /contrib/libreadline/macro.c | |
parent | 17222c720e12474e93a40d68fd9646bad49690a7 (diff) | |
download | FreeBSD-src-8aeb9782f4a5d98c23b918bdae2477810088d0d1.zip FreeBSD-src-8aeb9782f4a5d98c23b918bdae2477810088d0d1.tar.gz |
Virgin import of GNU Readline 5.1
Diffstat (limited to 'contrib/libreadline/macro.c')
-rw-r--r-- | contrib/libreadline/macro.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/libreadline/macro.c b/contrib/libreadline/macro.c index b73c3af..2975bf1 100644 --- a/contrib/libreadline/macro.c +++ b/contrib/libreadline/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. */ |