glts wrote:

> Hi,
>
> The new regexp engine seems unable to deal with combining characters.
> This is on Vim 7.4.9. Steps to reproduce:
>
>         :put =\"ca\u0300t\"
>         :echo getline('.') =~ '\%#=0a'
>         :echo getline('.') =~ '\%#=1a'
>
> Only the old regexp engine finds the match.
>
> Best,


It might be related to the TODO comments in regexp_nfa.c
at lines 1135 and 3161:

 1117                 case 'U':   /* %U1234abcd hex 8 */
 1118                     {
 1119                         int nr;
 1120
 1121                         switch (c)
 1122                         {
 1123                             case 'd': nr = getdecchrs(); break;
 1124                             case 'o': nr = getoctchrs(); break;
 1125                             case 'x': nr = gethexchrs(2); break;
 1126                             case 'u': nr = gethexchrs(4); break;
 1127                             case 'U': nr = gethexchrs(8); break;
 1128                             default:  nr = -1; break;
 1129                         }
 1130
 1131                         if (nr < 0)
 1132                             EMSG2_RET_FAIL(
 1133                                _("E678: Invalid character after
%s%%[dxouU]"),
 1134                                     reg_magic == MAGIC_ALL);
!1135                         /* TODO: what if a composing character follows? */
 1136                         EMIT(nr);
 1137                     }

 ...
 3158 #ifdef FEAT_MBYTE
 3159         case NFA_COMPOSING:     /* char with composing char */
 3160 #if 0
!3161             /* TODO */
 3162             if (regflags & RF_ICOMBINE)
 3163             {
 3164                 /* use the base character only */
 3165             }
 3166 #endif
 ....

Regards
Dominique

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui