From 0875071322b939e54894f3976ea87aed567121c9 Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 4 Oct 2013 08:45:21 +0000 Subject: [PATCH] Disable vim's new NFA regexp engine for now, it interacts badly with malloc flag 'J' (approx 10x slower in syntax highlighting). --- editors/vim/Makefile | 3 ++- editors/vim/patches/patch-src_option_c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 editors/vim/patches/patch-src_option_c diff --git a/editors/vim/Makefile b/editors/vim/Makefile index 7453e9f37d2..e74938a6877 100644 --- a/editors/vim/Makefile +++ b/editors/vim/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.130 2013/10/04 08:44:03 sthen Exp $ +# $OpenBSD: Makefile,v 1.131 2013/10/04 08:45:21 sthen Exp $ COMMENT-main= vi clone, many additional features COMMENT-lang= vi clone, NLS subpackage @@ -6,6 +6,7 @@ COMMENT-lang= vi clone, NLS subpackage VERSION= 7.4.45 DISTNAME= vim-${VERSION} PKGNAME-main= vim-${VERSION} +REVISION-main= 0 PKGNAME-lang= vim-lang-${VERSION} P= vim${VERSION:R:S/.//} CATEGORIES= editors diff --git a/editors/vim/patches/patch-src_option_c b/editors/vim/patches/patch-src_option_c new file mode 100644 index 00000000000..68d49ee7173 --- /dev/null +++ b/editors/vim/patches/patch-src_option_c @@ -0,0 +1,16 @@ +$OpenBSD: patch-src_option_c,v 1.1 2013/10/04 08:45:21 sthen Exp $ + +Disable new NFA regexp engine for now, syntax highlighting is unusably +slow if malloc flag 'J' is used. + +--- src/option.c.orig Tue Oct 1 08:50:58 2013 ++++ src/option.c Tue Oct 1 09:15:05 2013 +@@ -2097,7 +2097,7 @@ static struct vimoption + {(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}, ++ {(char_u *)1L, (char_u *)1L} 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},