aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/marktree.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/marktree.h')
-rw-r--r--src/nvim/marktree.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/marktree.h b/src/nvim/marktree.h
index 30f5aacebc..ae6da92106 100644
--- a/src/nvim/marktree.h
+++ b/src/nvim/marktree.h
@@ -1,14 +1,14 @@
#ifndef NVIM_MARKTREE_H
#define NVIM_MARKTREE_H
-#include <stdint.h>
#include <assert.h>
+#include <stdint.h>
#include "nvim/assert.h"
#include "nvim/garray.h"
#include "nvim/map.h"
-#include "nvim/types.h"
#include "nvim/pos.h"
+#include "nvim/types.h"
#define MT_MAX_DEPTH 20
#define MT_BRANCH_FACTOR 10
@@ -87,6 +87,11 @@ static inline bool mt_end(mtkey_t key)
return key.flags & MT_FLAG_END;
}
+static inline bool mt_start(mtkey_t key)
+{
+ return mt_paired(key) && !mt_end(key);
+}
+
static inline bool mt_right(mtkey_t key)
{
return key.flags & MT_FLAG_RIGHT_GRAVITY;