Implement tab-local working directory feature.

New ex commands: 'tcd', 'tchdir'
Changed Vimscript functions: 'haslocaldir', 'getcwd'

The ex-commands ':tcd' and ':tchdir' are the tab-local equivalents of
':lcd' and ':lchdir'. There are no new Vimscript functions introduced,
instead the functions 'haslocaldir' and 'getcwd' take in optional
arguments. See the documentation for details

Since there is now different levels of local directory a simple boolean
at source level is no longer sufficient; a new enumeration type is used
for the scope-level from now on.

The documentation has been accommodated for these new commands and
functional tests have been written to test the feature.
This commit is contained in:
HiPhish
2015-08-24 12:58:28 +02:00
parent a7a0bf54e3
commit ec71d87b81
10 changed files with 557 additions and 78 deletions

View File

@@ -816,10 +816,12 @@ struct tabpage_S {
was set */
diff_T *tp_first_diff;
buf_T *(tp_diffbuf[DB_COUNT]);
int tp_diff_invalid; /* list of diffs is outdated */
frame_T *(tp_snapshot[SNAP_COUNT]); /* window layout snapshots */
dictitem_T tp_winvar; /* variable for "t:" Dictionary */
dict_T *tp_vars; /* internal variables, local to tab page */
int tp_diff_invalid; ///< list of diffs is outdated */
frame_T *(tp_snapshot[SNAP_COUNT]); ///< window layout snapshots
dictitem_T tp_winvar; ///< variable for "t:" Dictionary
dict_T *tp_vars; ///< internal variables, local to tab page
char_u *localdir; ///< Absolute path of local directory or
///< NULL
};
/*