aboutsummaryrefslogtreecommitdiffstats
path: root/src/bin/win.c
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-05-22 20:45:13 +0200
committerBoris Faure <billiob@gmail.com>2016-05-22 20:45:13 +0200
commitcd0f61dd267041e2a43cad63c68feb6119049972 (patch)
tree3cad2f66920c189ef97e4a0f060bf5f8ed3e1030 /src/bin/win.c
parentMerge remote-tracking branch 'raboof/comment' (diff)
downloadterminology-cd0f61dd267041e2a43cad63c68feb6119049972.tar.gz
keybindings: fix binding to close focused term
Diffstat (limited to 'src/bin/win.c')
-rw-r--r--src/bin/win.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index ce22153..3f6ba9c 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2405,6 +2405,15 @@ _cb_new(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
_solo_tabs_new(tc);
}
+static void
+_cb_close(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
+{
+ Term *term = data;
+ Term_Container *tc = term->container;
+
+ term_close(tc->wn->win, term->termio, EINA_FALSE);
+}
+
void
main_new(Evas_Object *win EINA_UNUSED, Evas_Object *term)
{
@@ -4200,6 +4209,7 @@ term_new(Win *wn, Config *config, const char *cmd,
evas_object_smart_callback_add(o, "prev", _cb_prev, term);
evas_object_smart_callback_add(o, "next", _cb_next, term);
evas_object_smart_callback_add(o, "new", _cb_new, term);
+ evas_object_smart_callback_add(o, "close", _cb_close, term);
evas_object_smart_callback_add(o, "select", _cb_select, term);
evas_object_smart_callback_add(o, "split,h", _cb_split_h, term);
evas_object_smart_callback_add(o, "split,v", _cb_split_v, term);