1

Re: Repeatable crash in regular expression search

It seems that typing /^* [1] with viemu loaded causes Visual Studio (2005) to crash, and also, regular expressions with the ^ character don't seem to work as expected. In vim, regular expressions beginning with ^ ignore leading whitespace, while in viemu, the whitespace must be included as a part of the regular expression.

[1] In vim, the asterisk is treated as if it were escaped in this situation, so this search should find all lines beginning with the asterisk character.

2

Re: Repeatable crash in regular expression search

Actually, there are two ViEmu problems there. One is that ViEmu's regular expression engine lacks a protection measure that vim does: repeat-specifiers on atoms that can match with zero-width. That gets the engine into an infinite loop, crashing the environment./

The other problem is that I didn't know ^ could match anywhere but at 'hard-bol' (the way I tend to call column zero, hard-beginning-of-line, as opposed to soft-beginning-of-line which is where the ^ motion takes you). An oversight on my part, and as I followed vim's documentation literally when implementing the regex engine, which doesn't mention it AFAIR, it ended up this way.

I'll post here when I have a fix for both issues.

3

Re: Repeatable crash in regular expression search

jamarcus, I've checked, and (my) vim only matches ^ at column zero.

If it weren't this way, :g/^$/d wouldn't work as an idiom to remove all completely empty lines.

It's maybe a :set option, would be good to know which one - else I'll try to find it.

4

Re: Repeatable crash in regular expression search

:g/^$/d only removes completely empty lines for me, too. (It doesn't remove lines with whitespace). As far as I can tell, I don't have any options set that would affect this.

5

Re: Repeatable crash in regular expression search

And still "^a" matches a line starting like "   abc", that is, with spaces?

6

Re: Repeatable crash in regular expression search

Strange. I installed a clean version of vim and that is no longer happening. It must have been something I did. Sorry about the confusion.

7

Re: Repeatable crash in regular expression search

No problem, let me know if it happens again.