about summary refs log tree commit diff stats
path: root/src/ui/inputwin.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-06-17 00:15:28 +0100
committerJames Booth <boothj5@gmail.com>2015-06-17 00:15:28 +0100
commit2215a3791f4394394c3ddcde7dd4aa98c704809b (patch)
tree9d654ffdd90a49d22efa603cc926238b1d34eafa /src/ui/inputwin.c
parentcfef64c7677cdf66e2b37aa0aa5728262c3bb2f6 (diff)
downloadprofani-tty-2215a3791f4394394c3ddcde7dd4aa98c704809b.tar.gz
Added current window reference to command functions
Diffstat (limited to 'src/ui/inputwin.c')
-rw-r--r--src/ui/inputwin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 20c9900f..e29cec6c 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -436,8 +436,9 @@ _inp_rl_tab_handler(int count, int key)
         return 0;
     }
 
-    if ((strncmp(rl_line_buffer, "/", 1) != 0) && (ui_current_win_type() == WIN_MUC)) {
-        char *result = muc_autocomplete(rl_line_buffer);
+    ProfWin *current = wins_get_current();
+    if ((strncmp(rl_line_buffer, "/", 1) != 0) && (current->type == WIN_MUC)) {
+        char *result = muc_autocomplete(current, rl_line_buffer);
         if (result) {
             rl_replace_line(result, 0);
             rl_point = rl_end;