summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2015-04-30 19:11:31 +0200
committerBoris Faure <billiob@gmail.com>2015-04-30 19:11:31 +0200
commit563b592b81645828fbe85500289a64853320e95c (patch)
tree74d642e50c8dce9f63777253c1f6477dbe263d56 /src
parent6234a290eb1500ee48e10be8ce5c5668a002af39 (diff)
new tab inherits wdir. Closes T2379
Diffstat (limited to 'src')
-rw-r--r--src/bin/win.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index 3f02d75..89c49b8 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -2184,11 +2184,15 @@ _tab_new_cb(void *data,
2184 Evas_Coord x, y, w, h; 2184 Evas_Coord x, y, w, h;
2185 Term_Container *tc = (Term_Container*) tabs, 2185 Term_Container *tc = (Term_Container*) tabs,
2186 *tc_new, *tc_parent, *tc_old; 2186 *tc_new, *tc_parent, *tc_old;
2187 Term *tm_new; 2187 Term *tm, *tm_new;
2188 Win *wn = tc->wn; 2188 Win *wn = tc->wn;
2189 char buf[PATH_MAX], *wdir = NULL;
2189 2190
2191 tm = tc->focused_term_get(tc);
2192 if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
2193 wdir = buf;
2190 tm_new = term_new(wn, wn->config, 2194 tm_new = term_new(wn, wn->config,
2191 NULL, wn->config->login_shell, NULL, 2195 NULL, wn->config->login_shell, wdir,
2192 80, 24, EINA_FALSE); 2196 80, 24, EINA_FALSE);
2193 tc_new = _solo_new(tm_new, wn); 2197 tc_new = _solo_new(tm_new, wn);
2194 evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio); 2198 evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio);