about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-05-20 00:19:03 +0100
committerJames Booth <boothj5@gmail.com>2016-05-20 00:19:03 +0100
commiteaf2901b0138c5ac9beb3c3619246eef577b2b31 (patch)
tree77adc524e1fdec687f020308e4cc4fc9c8787fae /src/ui
parent458f9edbb0cb2b83f1abc7dcd4d124c73ea0ad0d (diff)
downloadprofani-tty-eaf2901b0138c5ac9beb3c3619246eef577b2b31.tar.gz
Add cmd_autocomplete.c
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c7
-rw-r--r--src/ui/inputwin.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index 0b761274..4397044b 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -56,6 +56,7 @@
 
 #include "chat_session.h"
 #include "command/command.h"
+#include "command/cmd_autocomplete.h"
 #include "common.h"
 #include "config/preferences.h"
 #include "config/theme.h"
@@ -651,12 +652,12 @@ ui_focus_win(ProfWin *window)
     ProfWin *old_current = wins_get_current();
     if (old_current->type == WIN_MUC_CONFIG) {
         ProfMucConfWin *confwin = (ProfMucConfWin*)old_current;
-        cmd_autocomplete_remove_form_fields(confwin->form);
+        cmd_ac_remove_form_fields(confwin->form);
     }
 
     if (window->type == WIN_MUC_CONFIG) {
         ProfMucConfWin *confwin = (ProfMucConfWin*)window;
-        cmd_autocomplete_add_form_fields(confwin->form);
+        cmd_ac_add_form_fields(confwin->form);
     }
 
     int i = wins_get_num(window);
@@ -679,7 +680,7 @@ ui_close_win(int index)
     if (window && window->type == WIN_MUC_CONFIG) {
         ProfMucConfWin *confwin = (ProfMucConfWin*)window;
         if (confwin->form) {
-            cmd_autocomplete_remove_form_fields(confwin->form);
+            cmd_ac_remove_form_fields(confwin->form);
         }
     }
 
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 2c7eae34..72f65271 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -53,7 +53,7 @@
 #include <ncurses.h>
 #endif
 
-#include "command/command.h"
+#include "command/cmd_autocomplete.h"
 #include "common.h"
 #include "config/accounts.h"
 #include "config/preferences.h"
@@ -452,7 +452,7 @@ _inp_rl_getc(FILE *stream)
     int ch = rl_getc(stream);
     if (_inp_printable(ch)) {
         ProfWin *window = wins_get_current();
-        cmd_reset_autocomplete(window);
+        cmd_ac_reset(window);
     }
     return ch;
 }
@@ -482,7 +482,7 @@ _inp_rl_tab_handler(int count, int key)
         }
     } else if (strncmp(rl_line_buffer, "/", 1) == 0) {
         ProfWin *window = wins_get_current();
-        char *result = cmd_autocomplete(window, rl_line_buffer);
+        char *result = cmd_ac_complete(window, rl_line_buffer);
         if (result) {
             rl_replace_line(result, 1);
             rl_point = rl_end;