vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 2bbe0826d6706ec4d77ee2c85fa3f2cc2655e709
parent 1cb6fdab6503f4de98320ac62f4ae35154832514
Author: noname <noname@inventati.org>
Date:   Fri,  3 Apr 2015 19:44:22 +0000

Fixed multiline comment regexp.

Comments like "/***/" with odd number of asterisks are handled like
normal comments now. Previously they were handled like unfinished
comments.

Diffstat:
Mconfig.def.h | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -869,10 +869,10 @@ static Color colors[] = { /* common rules, used by multiple languages */ -#define SYNTAX_MULTILINE_COMMENT { \ - "(/\\*([^*]|\\*+[^*/])*\\*+/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)", \ - &colors[COLOR_COMMENT], \ - true, /* multiline */ \ +#define SYNTAX_MULTILINE_COMMENT { \ + "(/\\*([^*]|\\*+[^*/])*\\*+/|/\\*([^*]|\\*+[^*/])*$|^([^/]|/+[^/*])*\\*/)", \ + &colors[COLOR_COMMENT], \ + true, /* multiline */ \ } #define SYNTAX_SINGLE_LINE_COMMENT { \