improve tests
fixes #100, #101 (GH)

* d should leave the caret at the first non-whitespace char
* 0 should include the right end
fix tests