From ca29638f2c43f54033f5c5c99faf595a3e199bf3 Mon Sep 17 00:00:00 2001 From: twardziejszy Date: Thu, 10 Jan 2019 12:44:52 +0100 Subject: Add prof_win_close (#1017) --- src/ui/inputwin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c index 654a4602..ece83233 100644 --- a/src/ui/inputwin.c +++ b/src/ui/inputwin.c @@ -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) { -- cgit 1.4.1-2-gfad0