From fbc0d2ea1e13fb55c267b72d64046e5ef984b97f Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 19 May 2013 19:40:29 +0200 Subject: 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) --- src/option.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/option.c') diff --git a/src/option.c b/src/option.c index cfe464c5b0..325f061d95 100644 --- 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, errbuf, errbuflen, opt_flags) 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; -- cgit v1.2.3