From cfef64c7677cdf66e2b37aa0aa5728262c3bb2f6 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 16 Jun 2015 22:59:08 +0100 Subject: Pass current window to autocompleters --- src/ui/inputwin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/ui/inputwin.c') diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 57814414..20c9900f 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -415,7 +415,8 @@ _inp_rl_getc(FILE *stream) { int ch = rl_getc(stream); if (_inp_printable(ch)) { - cmd_reset_autocomplete(); + ProfWin *window = wins_get_current(); + cmd_reset_autocomplete(window); } return ch; } @@ -442,7 +443,8 @@ _inp_rl_tab_handler(int count, int key) rl_point = rl_end; } } else if (strncmp(rl_line_buffer, "/", 1) == 0) { - char *result = cmd_autocomplete(rl_line_buffer); + ProfWin *window = wins_get_current(); + char *result = cmd_autocomplete(window, rl_line_buffer); if (result) { rl_replace_line(result, 0); rl_point = rl_end; -- cgit 1.4.1-2-gfad0