The redrawOnReattach flag will now be set when update
display is called on an invisible editor so that if the
editor is detached or hidden before the next update was
processed it will be performed when reattached.
The binding uses the `!important` selector to ensure that the editor
always gets a chance to clear multiple selections before other bindings
for escape are processed.
Previously, if a selection was added and removed before the editor got
a chance to update its display, it would try to add a selection view
for the destroyed selection. Now we check the new selections and
cursors to make sure they aren't destroyed before we add views for
them.
Previously, logic associated with swapping grammars was a bit
scattered. Now grammar reloading / assignment methods delegate to
LanguageMode directly, and it emits a 'grammar-changed' event when
the grammar changes. Now EditSession and TokenizedBuffer listen for
this event and perform necessary actions for grammar change.
When the scroll view is scrolled and overflow-x is set to
'hidden' the scroll view renders wrong. Setting scrollLeft to 0 fixes
this problem. I'm unhappy with this solution, but it was a
simple way to get the scroll view to update its layout.
Closes#137
This removes the need to compute the width of the gutter based
on the line count in the editor and also removes the need to
set the scroll view's left position manually.
Since this is the more external method, having a shorter name
is more convenient. The former `buildEditSession` method took a
Buffer, and is now called `buildEditSessionForBuffer`.
Now the status bar and tree view both listen for
status change events and use the cached information
available from the git object to update their views.
This saves the state of the rendered lines, the display buffer, the
tokenized buffer, and the buffer to a file. If a problem arises with
rendering, hopefully we can use it to diagnose in which layer things
went awry.
The whitespace in lines that have no non-whitespace
text is treated as trailing whitespace so add the
indent guide to the trailing whitespace tokens when the
line is 100% whitespace.
Mouse events that occur in the gutter are forwarded to the
rendered lines with the y-coordinate translated to be the
leftmost pixel of the editor to simulate the event originating
from column 0 of the current line row.
Closes#287