Commit Graph

5 Commits

Author SHA1 Message Date
Nathan Sobo
7061ea5d23 Kill stray console.log 2014-02-02 19:29:54 +06:00
Nathan Sobo
c3f995b165 Fix lurking soft-wrap bugs
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.
2014-01-30 00:52:17 -07:00
Kevin Sawicki
3c94ca4b9e Use relative paths in spec requires 2013-09-20 10:02:20 -07:00
Nathan Sobo
0192c57f46 Fix corner case in RowMap::mapBufferRowRange w/ 0-buffer-row regions
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.
2013-08-20 19:30:29 -06:00
Kevin Sawicki
a7a1244599 Flatten spec directory 2013-08-19 20:13:58 -07:00