aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.h
diff options
context:
space:
mode:
authorHiPhish <hiphish@Aleksandars-iMac.local>2015-08-24 12:58:28 +0200
committerHiPhish <hiphish@Aleksandars-iMac.local>2016-04-20 12:52:31 +0200
commitec71d87b8140ae097158f7e219b26701aed8158e (patch)
treeed9420d1d76c3b2ece7be3f8d89333604aa049f7 /src/nvim/ex_docmd.h
parenta7a0bf54e3f339f7bf1f97dee44546cdcd926b1d (diff)
downloadrneovim-ec71d87b8140ae097158f7e219b26701aed8158e.tar.gz
rneovim-ec71d87b8140ae097158f7e219b26701aed8158e.tar.bz2
rneovim-ec71d87b8140ae097158f7e219b26701aed8158e.zip
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.
Diffstat (limited to 'src/nvim/ex_docmd.h')
-rw-r--r--src/nvim/ex_docmd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/ex_docmd.h b/src/nvim/ex_docmd.h
index a5a4edbbbf..7af3ee233c 100644
--- a/src/nvim/ex_docmd.h
+++ b/src/nvim/ex_docmd.h
@@ -19,6 +19,18 @@
#define EXMODE_NORMAL 1
#define EXMODE_VIM 2
+/// The scope of a command.
+///
+/// The lower a number, the deeper the scope.
+typedef enum {
+ kCdScopeWindow, ///< Affects one window.
+ kCdScopeTab, ///< Affects one tab page.
+ kCdScopeGlobal, ///< Affects the entire instance of NeoVim.
+} CdScope;
+
+/// Last `:cd` scope defined.
+#define MAX_CD_SCOPE kCdScopeGlobal
+
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_docmd.h.generated.h"
#endif