diff options
author | twardziejszy <ogur@op.pl> | 2019-01-10 12:44:52 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2019-01-10 12:44:52 +0100 |
commit | ca29638f2c43f54033f5c5c99faf595a3e199bf3 (patch) | |
tree | 90530cf7be44cfe5e78025303bc5533f3d45ba71 /src | |
parent | a97202ace67673bc884e9cdf3c755783cec47407 (diff) | |
download | profani-tty-ca29638f2c43f54033f5c5c99faf595a3e199bf3.tar.gz |
Add prof_win_close (#1017)
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/inputwin.c | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ -504,6 +506,15 @@ _inp_rl_win_clear_handler(int count, int key) } 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) { if (rl_point != rl_end || !rl_line_buffer) { |