Re: substitution in C# hangs VS2008

Here is the selected code:
                    .then_has_a_field_containing(new string(' ', 19)) // message authentication code -- leave blank
                    .then_has_a_field_containing(new string(' ', 6)) // reserved -- leave blank

Here is what I'm trying to do:

This crashes VS every time -- well, the four times I tried it, anyway, including with :%s instead of :'<,'>s.


Re: substitution in C# hangs VS2008

Jay, congratulations, you've found a bug in the ViEmu regex engine!

It hasn't been easy to find and it hasn't been easy to fix, but I got it now. I had to delve back into the regex parser and compiler, and in the regex matching engine itself. The problem was that the internal code generation for the \| operator was declaring a full match too early. It worked when \| expressions were used in the toplevel, but if used insided a submatch between \( and \), the internal submatch markers weren't set correctly. After this, the EvalReplacement code in the :subst command implementation got caught in an infinite loop.

I can't release it right now, because I'm midway through the new licensing-system implementation, but the next release of ViEmu will definitely have this fixed. Meanwhile, please don't use expressions like:


in the :s command, please do the two substitutions in two steps:



  -- Jon