Fixes#1576
When splicing regions into the row map, we always express the starting
buffer row, then the number of buffer rows covered by the regions we're
inserting. When we're inserting regions representing folds, they always
extend to the end of a fold, so we need to ensure the endBufferRow also
extends to the end of the fold.
For example, say rows [5…10] are folded, and we handle a replacement of
rows [5…8]. We will still insert a region for the fold covering 1 screen
row and 5 buffer rows, so we need to update the endBufferRow to extend
to the end of the fold as well (10).
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.
We've gotten one rogue error but I have no idea how to reproduce it.
This will tell us if soft wrap is enabled and if any folds are present
so hopefully we can start narrowing these down.
Previously, when you always had to specify the event name of 'value'
when calling `::subscribe` with a signal. Now, if you don't specify an
event name, 'value' is assumed.
This commit introduces dependency on a new npm called
[reactionary](https://github.com/atom/reactionary). It will serve as a
*much* lighter weight model framework to provide the reactive features
of telepath without the replication logic.
Specs are still failing for panes and workspace. I plan to just roll
forward and remove the telepath dependency from them as well.
Register an overflowchanged event listener on the editor's scroll view
and update the width in chars when this event fires.
Closes#928Closes#961Closes#993
Telepath v0.14.0 is a ground-up rewrite of the replication library,
which is principally designed to support moving document fragments
within the overall document. But it's also a lot better in a number of
ways. This commit does the minimal to get things working on the new
telepath. Standard package specs don't pass yet. Also, I deleted the
replication specs since they are extremely convoluted and will be able
to be replaced with much better versions once I complete the changes
enabled by the new Telepath.