billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=4a30c10ed9ce11d5221b70c82b4ae07b2c71d408

commit 4a30c10ed9ce11d5221b70c82b4ae07b2c71d408
Author: Boris Faure <bill...@gmail.com>
Date:   Tue Apr 10 22:53:41 2018 +0200

    tabs: clicking on New uses current dir for new term according to config
---
 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 0564865..c09680b 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -3255,7 +3255,7 @@ _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, *tm_new;
+   Term *tm_new;
    Win *wn = tc->wn;
    char *wdir = NULL;
    char buf[PATH_MAX];
@@ -3264,7 +3264,11 @@ _tab_new_cb(void *data,
    // passing wdir NULL otherwise:
    if (wn->config->changedir_to_current)
      {
-        tm = tc->focused_term_get(tc);
+        Term *tm;
+
+        tc_old = tabs->current->tc;
+        tm = tc_old->term_first(tc_old);
+
         if (tm && termio_cwd_get(tm->termio, buf, sizeof(buf)))
           wdir = buf;
      }

-- 


Reply via email to