fix the E selection bug

by change find the next buffer position method
add the test for the situation
Merge pull request #234 from tony612/fix-motion-E-selection-bug

Fix the E selection bug