summaryrefslogtreecommitdiff
path: root/complete.c
diff options
context:
space:
mode:
Diffstat (limited to 'complete.c')
-rw-r--r--complete.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/complete.c b/complete.c
index 20bb1ea..59b486a 100644
--- a/complete.c
+++ b/complete.c
@@ -2208,7 +2208,7 @@ rl_old_menu_complete (count, invoking_key)
/* The first time through, we generate the list of matches and set things
up to insert them. */
- if (rl_last_func != rl_menu_complete)
+ if (rl_last_func != rl_old_menu_complete)
{
/* Clean up from previous call, if any. */
FREE (orig_text);
@@ -2220,6 +2220,8 @@ rl_old_menu_complete (count, invoking_key)
rl_completion_invoking_key = invoking_key;
+ RL_SETSTATE(RL_STATE_COMPLETING);
+
/* Only the completion entry function can change these. */
set_completion_defaults ('%');
@@ -2259,9 +2261,12 @@ rl_old_menu_complete (count, invoking_key)
FREE (orig_text);
orig_text = (char *)0;
completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
return (0);
}
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+
for (match_list_size = 0; matches[match_list_size]; match_list_size++)
;
/* matches[0] is lcd if match_list_size > 1, but the circular buffer
@@ -2337,6 +2342,8 @@ rl_menu_complete (count, ignore)
full_completion = 0;
+ RL_SETSTATE(RL_STATE_COMPLETING);
+
/* Only the completion entry function can change these. */
set_completion_defaults ('%');
@@ -2378,9 +2385,12 @@ rl_menu_complete (count, ignore)
FREE (orig_text);
orig_text = (char *)0;
completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
return (0);
}
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+
for (match_list_size = 0; matches[match_list_size]; match_list_size++)
;