From 626065d385c4f7a06d2aa3dedf2fbb8fa68bfb48 Mon Sep 17 00:00:00 2001 From: Alejandro Sanchez Date: Sun, 4 Sep 2016 03:40:01 +0200 Subject: tchdir: New tab should inherit CWD. (#5227) When a new tabpage gets created it will copy the local working directory of the previous one, if there is any. --- src/nvim/window.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/window.c b/src/nvim/window.c index ee99dd5d68..2e97cb2c3e 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -2978,6 +2978,9 @@ int win_new_tabpage(int after, char_u *filename) xfree(newtp); return FAIL; } + + newtp->localdir = tp->localdir ? vim_strsave(tp->localdir) : NULL; + curtab = newtp; /* Create a new empty window. */ -- cgit