aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-03-11 17:26:22 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-03-12 12:39:20 +0100
commit82117da5df93666798b94e4e6e47e11dcb1b4dcd (patch)
tree94456ff61f62b20cb9c16bc7f111905272782134 /src/nvim/window.c
parentc8f0f8fea6e3170db0d68d61dd84f3c3ef9ee77c (diff)
downloadrneovim-82117da5df93666798b94e4e6e47e11dcb1b4dcd.tar.gz
rneovim-82117da5df93666798b94e4e6e47e11dcb1b4dcd.tar.bz2
rneovim-82117da5df93666798b94e4e6e47e11dcb1b4dcd.zip
tabpage_S: Name tp_localdir per convention.
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 73a60b2e04..0c265a5ede 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -2998,8 +2998,7 @@ void free_tabpage(tabpage_T *tp)
hash_init(&tp->tp_vars->dv_hashtab);
unref_var_dict(tp->tp_vars);
-
- xfree(tp->localdir); // Free tab-local working directory
+ xfree(tp->tp_localdir);
xfree(tp);
}
@@ -3025,7 +3024,7 @@ int win_new_tabpage(int after, char_u *filename)
return FAIL;
}
- newtp->localdir = tp->localdir ? vim_strsave(tp->localdir) : NULL;
+ newtp->tp_localdir = tp->tp_localdir ? vim_strsave(tp->tp_localdir) : NULL;
curtab = newtp;
@@ -3617,9 +3616,9 @@ static void win_enter_ext(win_T *wp, bool undo_sync, int curwin_invalid,
curwin->w_cursor.coladd = 0;
changed_line_abv_curs(); /* assume cursor position needs updating */
- // The new directory is either the local directory of the window, of the tab
- // or NULL.
- char_u *new_dir = curwin->w_localdir ? curwin->w_localdir : curtab->localdir;
+ // The new directory is either the local directory of the window, tab or NULL.
+ char_u *new_dir = curwin->w_localdir
+ ? curwin->w_localdir : curtab->tp_localdir;
if (new_dir) {
// Window/tab has a local directory: Save current directory as global