Fix bug in viewCuttingPoint

Issue #2332
Make cursor motion between input cause separate history events

Issue #2305
Default the origin of replaceSelection to +input

Since it's what you want most of the time, and easy to forget.
Fix bug in setting gutter height