aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-16 22:59:08 +0100
committerJames Booth <boothj5@gmail.com>2015-06-16 22:59:08 +0100
commitcfef64c7677cdf66e2b37aa0aa5728262c3bb2f6 (patch)
treef587c714ca4cd21053b4821cf151ceadff55932e /src/ui
parentfb0e0659023e6483418de2a06626d640644e94d9 (diff)
downloadprofani-tty-cfef64c7677cdf66e2b37aa0aa5728262c3bb2f6.tar.gz
Pass current window to autocompleters
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/inputwin.c6
1 files changed, 4 insertions, 2 deletions
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;