From 70324f7a8a274e0cf57e55241ba8246b2ef6ab63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bert=20M=C3=BCnnich?= Date: Tue, 25 Jun 2019 14:20:45 +0200 Subject: 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. --- edit-readline.c | 6 +++--- 1 file 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; } -- cgit v1.2.3