This changes the behavior of cursor movement so that all cursors are
adjusted when a change is made to the buffer. Cursors don't have to be
manually moved after calling Insert or Remove, those functions will move
the cursor properly on their own.
This should fix issues 1-3 mentioned in the multiple cursors discussion.
Ref #5
* corrected spelling error and missing public function comments
* check for readonly and if true do not insert character
* mouse middle click checks for view type readonly and does not paste if view is readonly
* check for view readonly with binding keys and if readonly do not change the content.
We use a diff to be able to transform the buffer into an arbitrary
string (usually when we reread the file after an external program such
as gofmt has changed it) and still preserve undo/redo.
Fixes#136
This is better design because the cursor and eventhandler are things the
buffer should know about directly but the view shouldn't. This should
make it easier to add persistent undo or location saving between
sessions (see #107).