Previously classes containing the spec/suite id were used which
caused major amounts of time finding DOM nodes using class selectors
instead of id selectors.
This decreases the Editor spec from ~90s to ~30s.
DisplayBuffer now observes for config changes to the preferred line length
and the preference to soft wrap at the preferred line length to update
any wrapped screen lines.
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.
atom.open now takes an options has that can contain either pathsToOpen
or the complete settings of a new window.
This will be used by the collaboration package to open the window when a
session is being joined.
Previously Python import blocks were not tokenizing correctly since
the loop was prematurely terminating when a match at the end of the line
was reached and no tokens were generated for it.
This approach was incorrect since the tokenizer may have just popped a rule
and another loop could possibly pop more rules.
Now this early termination is only performed if the stack size hasn't changed.
Previously fsUtils.listTreeSync() was used which returns every path
in the tree, not just paths directly underneath the root path.
This speeds up the spec suite require time by not stat'ing the entire
node_modules directory.
Previously, we were not including the text when serializing an
unmodified buffer. We would use the absence of the text field to
determine that the buffer was previously unmodified when deserializing.
The problem is that text now stores the markers associated with the
buffer, and we want to retain those across serialization regardless of
the modified status. So now I include the text always, along with an
isModified flag which if true, will tell to reload the buffer if it
has changed since we last serialized it. Reloading a buffer should
probably do a diff-and-patch in the future rather than replacing the
contents outright, so that we always preserve markers as best as we can.