aboutsummaryrefslogtreecommitdiff
path: root/readline/macro.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2006-05-05 18:26:14 +0000
committerDaniel Jacobowitz <drow@false.org>2006-05-05 18:26:14 +0000
commit5bdf8622148be4764cc0757fd5b3e41f4d73b2b2 (patch)
treeec69331983824d95160ec9a14f71d6bccd23ed42 /readline/macro.c
parent7f8411279d59ee620d1e2e153329c0bd47c4ca86 (diff)
downloadfsf-binutils-gdb-5bdf8622148be4764cc0757fd5b3e41f4d73b2b2.zip
fsf-binutils-gdb-5bdf8622148be4764cc0757fd5b3e41f4d73b2b2.tar.gz
fsf-binutils-gdb-5bdf8622148be4764cc0757fd5b3e41f4d73b2b2.tar.bz2
Readline 5.1 import for HEAD.
Diffstat (limited to 'readline/macro.c')
-rw-r--r--readline/macro.c9
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. */