1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Add prof_win_close (#1017)

This commit is contained in:
twardziejszy 2019-01-10 12:44:52 +01:00 committed by Michael Vetter
parent a97202ace6
commit ca29638f2c

View File

@ -98,6 +98,7 @@ static void _inp_rl_linehandler(char *line);
static int _inp_rl_tab_handler(int count, int key);
static int _inp_rl_shift_tab_handler(int count, int key);
static int _inp_rl_win_clear_handler(int count, int key);
static int _inp_rl_win_close_handler(int count, int key);
static int _inp_rl_win_1_handler(int count, int key);
static int _inp_rl_win_2_handler(int count, int key);
static int _inp_rl_win_3_handler(int count, int key);
@ -387,6 +388,7 @@ _inp_rl_addfuncs(void)
rl_add_funmap_entry("prof_subwin_pageup", _inp_rl_subwin_pageup_handler);
rl_add_funmap_entry("prof_subwin_pagedown", _inp_rl_subwin_pagedown_handler);
rl_add_funmap_entry("prof_win_clear", _inp_rl_win_clear_handler);
rl_add_funmap_entry("prof_win_close", _inp_rl_win_close_handler);
}
// Readline callbacks
@ -503,6 +505,15 @@ _inp_rl_win_clear_handler(int count, int key)
return 0;
}
static int
_inp_rl_win_close_handler(int count, int key)
{
ProfWin *win = wins_get_current();
gchar* args = 0;
cmd_close(win, 0, &args);
return 0;
}
static int
_inp_rl_tab_handler(int count, int key)
{