billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=563b592b81645828fbe85500289a64853320e95c

commit 563b592b81645828fbe85500289a64853320e95c
Author: Boris Faure <bill...@gmail.com>
Date:   Thu Apr 30 19:11:31 2015 +0200

    new tab inherits wdir. Closes T2379
---
 src/bin/win.c | 8 ++++++--
 1 file 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,
    Evas_Coord x, y, w, h;
    Term_Container *tc = (Term_Container*) tabs,
                   *tc_new, *tc_parent, *tc_old;
-   Term *tm_new;
+   Term *tm, *tm_new;
    Win *wn = tc->wn;
+   char buf[PATH_MAX], *wdir = NULL;
 
+   tm = tc->focused_term_get(tc);
+   if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
+     wdir = buf;
    tm_new = term_new(wn, wn->config,
-                     NULL, wn->config->login_shell, NULL,
+                     NULL, wn->config->login_shell, wdir,
                      80, 24, EINA_FALSE);
    tc_new = _solo_new(tm_new, wn);
    evas_object_data_set(tm_new->termio, "sizedone", tm_new->termio);

-- 


Reply via email to