Added current window reference to command functions

This commit is contained in:
James Booth
2015-06-17 00:15:28 +01:00
parent cfef64c767
commit 2215a3791f
24 changed files with 582 additions and 578 deletions

View File

@@ -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;