This commit adds two important things:
1. An editor spec that randomly mutates a buffer and toggles soft wrap
on and off, then compares the screen lines to a simple reference
implementation to ensure everything stays in a correct state.
2. A new and radically simpler implementation of RowMap that eliminates
failures in the randomized test.
Fixes#688
The DisplayBuffer applies buffer and screen deltas to the row map as
rows are inserted/removed from the buffer/screen. This can leave some
of the regions in a weird state, such as mapping multiple screen rows
to zero buffer rows. But next the DisplayBuffer applies any new mappings
based on the replaced lines over the top of existing regions. These
weirdly shaped regions should be overwritten by newly inserted regions,
so at the end of the operation the row map makes sense again.
This fixes a corner case where regions spanning 0 buffer rows at the
very beginning of the row range were not being included in the set of
regions to replace. This was in turn causing the RowMap to get into a
bad state in certain situations involving soft-wrapped lines.