about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-07-09 01:06:33 +0100
committerJames Booth <boothj5@gmail.com>2014-07-09 01:06:33 +0100
commit4a19e7e82f5a3549087196dc5e0461cd65741d2c (patch)
treef3bc865c3ed585fb7c8dfa0061e646c3b66e0453 /src
parent175da6c9a0ab427fd6097c83299ce5c730e68faf (diff)
parent88180568e05b3b474384d9352359264f5633fa75 (diff)
downloadprofani-tty-4a19e7e82f5a3549087196dc5e0461cd65741d2c.tar.gz
Merge branch 'master' into winbuffers
Diffstat (limited to 'src')
-rw-r--r--src/muc.c1
-rw-r--r--src/ui/inputwin.c11
2 files changed, 6 insertions, 6 deletions
diff --git a/src/muc.c b/src/muc.c
index 4e943b9c..14d12bbf 100644
--- a/src/muc.c
+++ b/src/muc.c
@@ -581,7 +581,6 @@ muc_autocomplete(char *input, int *size)
             result = autocomplete_complete(nick_ac, input);
         } else {
             int len = (last_space - input);
-            cons_debug("SIZE: %d", len);
             char *start_str = strndup(input, len);
             result = autocomplete_param_with_ac(input, size, start_str, nick_ac);
             free(start_str);
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index f90c59a2..0dbd5b65 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -512,11 +512,12 @@ _handle_edit(int result, const wint_t ch, char *input, int *size)
             return 1;
 
         case 9: // tab
-            if ((strncmp(input, "/", 1) != 0) && (ui_current_win_type() == WIN_MUC)) {
-                cons_debug("MUC AC");
-                muc_autocomplete(input, size);
-            } else {
-                cmd_autocomplete(input, size);
+            if (*size != 0) {
+                if ((strncmp(input, "/", 1) != 0) && (ui_current_win_type() == WIN_MUC)) {
+                    muc_autocomplete(input, size);
+                } else if (strncmp(input, "/", 1) == 0) {
+                    cmd_autocomplete(input, size);
+                }
             }
             return 1;