diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:49:12 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-11-21 20:49:12 -0500 |
commit | 89a92869e56aba4e4cab2d639c00a86f0545c862 (patch) | |
tree | e1cd4da50318af8ab1f3141d39d4b0b8e1e7c500 /lib/readline/complete.c | |
parent | 17345e5ad288f7543b77b23a25aa380eacc279f2 (diff) | |
download | android_external_bash-89a92869e56aba4e4cab2d639c00a86f0545c862.tar.gz android_external_bash-89a92869e56aba4e4cab2d639c00a86f0545c862.tar.bz2 android_external_bash-89a92869e56aba4e4cab2d639c00a86f0545c862.zip |
Bash-4.0 patchlevel 38
Diffstat (limited to 'lib/readline/complete.c')
-rw-r--r-- | lib/readline/complete.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/readline/complete.c b/lib/readline/complete.c index 20bb1ea..59b486a 100644 --- a/lib/readline/complete.c +++ b/lib/readline/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++) ; |