diff options
| author | Bert Münnich <ber.t@posteo.de> | 2019-06-25 14:20:45 +0200 |
|---|---|---|
| committer | Bert Münnich <ber.t@posteo.de> | 2019-12-06 17:57:34 +0100 |
| commit | 70324f7a8a274e0cf57e55241ba8246b2ef6ab63 (patch) | |
| tree | 023f791aa3457f13119a0795c68227db681d51b2 /edit-readline.c | |
| parent | 7da695f64b647eff0744e545124f51dd04194757 (diff) | |
Allow empty context-aware completion
We do not want to fall back to filename completion just because the
context-aware completion did not produce any matches.
Diffstat (limited to 'edit-readline.c')
| -rw-r--r-- | edit-readline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/edit-readline.c b/edit-readline.c index 4be8f1e..56b5970 100644 --- a/edit-readline.c +++ b/edit-readline.c @@ -183,12 +183,12 @@ static char **rc_completion(const char *text, int start, int end) { if (compentry_func != NULL) { func = compentry_func; compentry_func = NULL; - rl_attempted_completion_over = 1; } else func = compl_func(text, start, end); - if (func != NULL) + if (func != NULL) { + rl_attempted_completion_over = 1; return rl_completion_matches(text, func); - else + } else return NULL; } |