aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.h
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-27 23:15:08 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-27 23:15:08 -0400
commitef4c0070cee64ab18529e76d87b4f20f3d6dabfe (patch)
tree129b64d2a2773367bee507177cfe5caf4ec419bd /src/nvim/ex_docmd.h
parentc6594d73c67eb53a70f0bd6ba3802d7ed333f371 (diff)
parentf644d8d88e621ab11dcb831b3cee6c5ea1df24b2 (diff)
downloadrneovim-ef4c0070cee64ab18529e76d87b4f20f3d6dabfe.tar.gz
rneovim-ef4c0070cee64ab18529e76d87b4f20f3d6dabfe.tar.bz2
rneovim-ef4c0070cee64ab18529e76d87b4f20f3d6dabfe.zip
Merge pull request #4652 from HiPhish/coverity-defects
Fix coverity errors in `haslocaldir()` and `getcwd()`.
Diffstat (limited to 'src/nvim/ex_docmd.h')
-rw-r--r--src/nvim/ex_docmd.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.h b/src/nvim/ex_docmd.h
index 7af3ee233c..dbfc64e2f1 100644
--- a/src/nvim/ex_docmd.h
+++ b/src/nvim/ex_docmd.h
@@ -19,16 +19,18 @@
#define EXMODE_NORMAL 1
#define EXMODE_VIM 2
-/// The scope of a command.
+/// The scope of a working-directory command like `:cd`.
///
-/// The lower a number, the deeper the scope.
+/// Scopes are enumerated from lowest to highest. When adding a scope make sure
+/// to update all functions using scopes as well, such as the implementation of
+/// `getcwd()`. When using scopes as limits (e.g. in loops) don't use the scopes
+/// directly, use `MIN_CD_SCOPE` and `MAX_CD_SCOPE` instead.
typedef enum {
kCdScopeWindow, ///< Affects one window.
kCdScopeTab, ///< Affects one tab page.
- kCdScopeGlobal, ///< Affects the entire instance of NeoVim.
+ kCdScopeGlobal, ///< Affects the entire instance of Neovim.
} CdScope;
-
-/// Last `:cd` scope defined.
+#define MIN_CD_SCOPE kCdScopeWindow
#define MAX_CD_SCOPE kCdScopeGlobal
#ifdef INCLUDE_GENERATED_DECLARATIONS