Fix bug #636 beach ball while doing :s///g with ^ and $
Fix bug substitute $ case
Merge pull request #654 from pebble8888/fix_substitute

Fix bug #636 beach ball while doing :s///g with ^ and $