aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2018-04-10 22:53:41 +0200
committerBoris Faure <billiob@gmail.com>2018-04-10 22:53:41 +0200
commit4a30c10ed9ce11d5221b70c82b4ae07b2c71d408 (patch)
tree637439edcddfb96b494e63888b87563b5b986777 /src
parentTerminology release 1.2.0 (diff)
downloadterminology-4a30c10ed9ce11d5221b70c82b4ae07b2c71d408.tar.gz
tabs: clicking on New uses current dir for new term according to configv1.2.0
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 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;
}