List *listtbl[2][2];
List *ll;
int listid = 1;
- int endnode = 0;
+ int endnode;
List *thislist;
List *nextlist;
List *neglist;
case NFA_MULTIBYTE:
case NFA_COMPOSING:
- switch (t->state->c)
- {
- case NFA_MULTIBYTE: endnode = NFA_END_MULTIBYTE; break;
- case NFA_COMPOSING: endnode = NFA_END_COMPOSING; break;
- default: endnode = 0;
- }
-
+ endnode = t->state->c + 1;
result = OK;
sta = t->state->out;
len = 1;
{
if (reginput[len-1] != sta->c)
{
- result = OK - 1;
+ result = FAIL;
break;
}
len++;
/* if input char length doesn't match regexp char length */
if (len -1 < n || sta->c != endnode)
- result = OK - 1;
+ result = FAIL;
end = t->state->out1; /* NFA_END_MULTIBYTE or
NFA_END_COMPOSING */
/* If \Z was present, then ignore composing characters */
- if (regflags & RF_ICOMBINE)
+ if (ireg_icombine && endnode == NFA_END_COMPOSING)
result = 1 ^ sta->negated;
ADD_POS_NEG_STATE(end);
break;
STARTTEST
:so small.vim
:so mbyte.vim
-:set nocp encoding=utf-8 viminfo+=nviminfo
+:set nocp encoding=utf-8 viminfo+=nviminfo nomore
:" tl is a List of Lists with:
:" regexp pattern
:" text to test the pattern on
:call add(tl, ['\f\+', '&*\9ffname ', 'fname'])
:call add(tl, ['\%#=1\f\+', '&*\9ffname ', 'fname'])
+:"""" Test \Z
+:call add(tl, ['ú\Z', 'x'])
+
:"""" Combining different tests and features
:call add(tl, ['[^[=a=]]\+', 'ddaãâbcd', 'dd'])
:"""" Run the tests
-
:"
:for t in tl
: let l = matchlist(t[1], t[0])