Mercurial > vim
diff src/option.c @ 4444:ccecb03e5e8b v7.3.970
updated for version 7.3.970
Problem: Syntax highlighting can be slow.
Solution: Include the NFA regexp engine. Add the 'regexpengine' option to
select which one is used. (various authors, including Ken Takata,
Andrei Aiordachioaie, Russ Cox, Xiaozhou Liua, Ian Young)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 19 May 2013 19:40:29 +0200 |
parents | b7f2d97ae2b7 |
children | cadb57fbb781 |
line wrap: on
line diff
--- a/src/option.c +++ b/src/option.c @@ -2077,6 +2077,9 @@ static struct vimoption (char_u *)NULL, PV_NONE, #endif {(char_u *)2000L, (char_u *)0L} SCRIPTID_INIT}, + {"regexpengine", "re", P_NUM|P_VI_DEF, + (char_u *)&p_re, PV_NONE, + {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT}, {"relativenumber", "rnu", P_BOOL|P_VI_DEF|P_RWIN, (char_u *)VAR_WIN, PV_RNU, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, @@ -8604,6 +8607,11 @@ set_num_option(opt_idx, varp, value, err errmsg = e_positive; p_hi = 0; } + if (p_re < 0 || p_re > 2) + { + errmsg = e_invarg; + p_re = 0; + } if (p_report < 0) { errmsg = e_positive;