Mercurial > vim
diff src/structs.h @ 23505:bb29b09902d5 v8.2.2295
patch 8.2.2295: incsearch does not detect empty pattern properly
Commit: https://github.com/vim/vim/commit/d93a7fc1a98a58f8101ee780d4735079ad99ae35
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 4 12:42:13 2021 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Jan 2021 12:45:05 +0100 |
parents | d2b1269c2c68 |
children | 27ca5534a408 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -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;