1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Added case-sensitive regexp matching for hilights

This commit is contained in:
isundil 2016-04-29 22:17:48 +00:00
parent ddd5416430
commit e7a18759ec

View File

@ -122,8 +122,11 @@ static void hilight_init_rec(HILIGHT_REC *rec)
{
#ifdef HAVE_REGEX_H
if (rec->regexp_compiled) regfree(&rec->preg);
rec->regexp_compiled = !rec->regexp ? FALSE :
regcomp(&rec->preg, rec->text, REG_EXTENDED|REG_ICASE) == 0;
if (!rec->regexp)
rec->regexp_compiled = FALSE;
else
rec->regexp_compiled = regcomp(&rec->preg, rec->text,
rec->case_sensitive ? REG_EXTENDED : (REG_EXTENDED|REG_ICASE)) == 0;
#endif
}