Question

In Vim the command

:echo substitute('-bb', '\zeb', 'a', 'g')

prints the following output:

-aabab

Why are two letters inserted before the first b?

Was it helpful?

Solution

This is a bug, and a patch has been submitted; thanks Christian!

Edit: It's been accepted as Patch 7.4.045.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top