aboutsummaryrefslogtreecommitdiff
path: root/xC.c
diff options
context:
space:
mode:
Diffstat (limited to 'xC.c')
-rw-r--r--xC.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xC.c b/xC.c
index e6ece0d..211f3e0 100644
--- a/xC.c
+++ b/xC.c
@@ -14434,6 +14434,15 @@ app_readline_completion (const char *text, int start, int end)
return make_input_completions (g_ctx, rl_line_buffer, start, end);
}
+static void
+app_readline_display_matches (char **matches, int len, int longest)
+{
+ struct app_context *ctx = g_ctx;
+ CALL (ctx->input, hide);
+ rl_display_match_list (matches, len, longest);
+ CALL (ctx->input, show);
+}
+
static int
app_readline_init (void)
{
@@ -14458,7 +14467,10 @@ app_readline_init (void)
rl_bind_key (RETURN, rl_named_function ("send-line"));
CALL_ (self, bind_control, 'j', "send-line");
+ rl_completion_display_matches_hook = app_readline_display_matches;
+
rl_variable_bind ("completion-ignore-case", "on");
+ rl_variable_bind ("menu-complete-display-prefix", "on");
rl_bind_key (TAB, rl_named_function ("menu-complete"));
if (key_btab)
CALL_ (self, bind, key_btab, "menu-complete-backward");