import of readlilne 5.1
[deliverable/binutils-gdb.git] / readline / macro.c
index b73c3af9aa47304b02200df7edfbf717f6388dc5..2975bf1f74fae541d05033b44b824257d8c631f1 100644 (file)
@@ -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. */
This page took 0.026914 seconds and 4 git commands to generate.