aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_defs.h
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-04 10:32:20 +0800
committerGitHub <noreply@github.com>2022-12-04 10:32:20 +0800
commita0dd663c2d321ce107aa07005aa01b9c341c5df2 (patch)
tree32295d58a80f90a2d3b1d66d9034c7bd2fc4a093 /src/nvim/regexp_defs.h
parentfba0562723a1af143c9e9509920d03d8231b8bf7 (diff)
parent9476dd2f923d9e5d86237836131f67024613308f (diff)
downloadrneovim-a0dd663c2d321ce107aa07005aa01b9c341c5df2.tar.gz
rneovim-a0dd663c2d321ce107aa07005aa01b9c341c5df2.tar.bz2
rneovim-a0dd663c2d321ce107aa07005aa01b9c341c5df2.zip
Merge pull request #21279 from zeertzjq/vim-8.2.2182
vim-patch:8.2.{2182,2295,3265,3292}: search fixes
Diffstat (limited to 'src/nvim/regexp_defs.h')
-rw-r--r--src/nvim/regexp_defs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/regexp_defs.h b/src/nvim/regexp_defs.h
index a3b77f295a..16bb2db464 100644
--- a/src/nvim/regexp_defs.h
+++ b/src/nvim/regexp_defs.h
@@ -15,6 +15,24 @@
#include "nvim/pos.h"
#include "nvim/types.h"
+/// Used for "magic_overruled".
+typedef enum {
+ OPTION_MAGIC_NOT_SET, ///< p_magic not overruled
+ OPTION_MAGIC_ON, ///< magic on inside regexp
+ OPTION_MAGIC_OFF, ///< magic off inside regexp
+} optmagic_T;
+
+/// Magicness of a pattern, used by regexp code.
+/// The order and values matter:
+/// magic <= MAGIC_OFF includes MAGIC_NONE
+/// magic >= MAGIC_ON includes MAGIC_ALL
+typedef enum {
+ MAGIC_NONE = 1, ///< "\V" very unmagic
+ MAGIC_OFF = 2, ///< "\M" or 'magic' off
+ MAGIC_ON = 3, ///< "\m" or 'magic'
+ MAGIC_ALL = 4, ///< "\v" very magic
+} magic_T;
+
// The number of sub-matches is limited to 10.
// The first one (index 0) is the whole match, referenced with "\0".
// The second one (index 1) is the first sub-match, referenced with "\1".