1
0
forked from aniani/vim

patch 8.2.2295: incsearch does not detect empty pattern properly

Problem:    Incsearch does not detect empty pattern properly.
Solution:   Return magic state when skipping over a pattern. (Christian
            Brabandt, closes #7612, closes #6420)
This commit is contained in:
Bram Moolenaar
2021-01-04 12:42:13 +01:00
parent 82c38fe508
commit d93a7fc1a9
15 changed files with 125 additions and 40 deletions

View File

@@ -4321,8 +4321,20 @@ typedef struct
// with iconv() to be able to allocate a buffer.
#define ICONV_MULT 8
// Used for "magic_overruled".
typedef enum {
MAGIC_NOT_SET, // p_magic not overruled
MAGIC_ON, // magic on inside regexp
MAGIC_OFF // magic off inside regexp
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;