Taking the initial measurement was setting the soft wrap column, which
was triggering a display layer reset, which was scheduling an update.
This update occurred at an unexpected time causing an exception.
I was hoping to strictly contain the layouts of highlights an lines
separately, since they are updated during different render phases.
Unfortunately, strict containment requires both divs to be positioned
absolutely. This in turn creates separate stacking contexts for lines
and highlights, which makes it impossible to render highlights in front
lines which themes sometimes need to do. For example,
atom-material-syntax pushes bracket matcher highlights to the front so
they are not obscured by the theme's solid black cursor line background.
/cc @as-cii. You should examine my work here and make sure I'm not
screwing something up with your line/block decoration update code.
There are still a few rootComponent references remaining in the
LineNumberGutterComponent. These should be removed and instead we should
consult this data when constructing the line numbers to render.
Unfortunately Chromium does not trigger a `compositionstart` before
firing the text input event for the non accented character. Using `undo`
to remove such character from the history is risky because it could be
grouped with a previous change, thus making Atom undo too much.
With this commit we simply keep the behavior master exhibits as of
today. In the process of rewriting this code path, however, we fixed a
bug that occurred when opening the accented character menu while holding
another key, and improved test coverage as well by simulating the events
the browser triggers.
Ideally, packages would resize and then wait for an update. But we set
up an example of calling measureDimensions directly in find-and-replace
so the easiest thing for now is just to keep this method around.
Previously, when the gutter container was removed due to the editor
becoming mini, the lack of keys caused the gutter to be updated with the
recycled cursors vnode. But then we tried to remove the cursors vnode
not realizing it had been moved and tore down all the references.
We probably need to revisit whether it makes sense to recycle vnodes.
These methods require us to render off-screen lines in some
circumstances in order to measure them, so this commit extends the
rendering of the longest line to include arbitrary lines.