This commit uses a new private API on Workspace that emits an event
every time the window title gets updated (e.g. as a result of an active
pane item changing, the project paths changing, etc.).
This fixes a bug that left the custom title bar with a stale
document.title under some circumstances.
Signed-off-by: Jason Rudolph <jasonrudolph@github.com>
Before rendering block decorations, we read their heights by putting
them into a special div called `blockDecorationMeasurementsArea`.
Previously, this div was not explicitly sized, which was causing
decorations to wrap while being measured but not when actually rendering
them.
This commit fixes this inconsistency by explicitly styling the
measurement area so that it has the same width as the component scroll
width.
By the time that the animation frame is delivered, the requested
autoscroll
position could not exist anymore. This could cause the editor component
to measure a non-existent line and, as a result, throw an exception.
With this commit we will always ignore measurements for screen lines
that do not exist.
This makes observeActiveTextEditor consistent with observers like
observeActivePaneItem, which always invoke the callback with the current
value, regardless of whether that value is undefined or not.
Fixes the following bug:
1. Open Atom
2. Open a file
3. Observe the file's encoding in the status bar
4. Reload Atom
5. Close the file
6. Observe that the closed file's encoding is still present in the
status bar
This bug occured because the reload did not deserialize/serialze the
workspace's active text editor state. As a result, when closing the
text editor in step 5, we failed to notify observers that there is no
longer an active text editor.
WorkspaceCenter's observeTextEditors method calls
this.onDidAddTextEditor, but WorkspaceCenter didn't have an
onDidAddTextEditor method. This commit adds a test for
observeTextEditors and it adds the missing onDidAddTextEditor method to
make the test pass.
Dock's observeTextEditors() method calls this.onDidAddTextEditor(), but
Dock didn't have an onDidAddTextEditor method. 🙀
Dock's observeTextEditors() method also calls this.getTextEditors(), and
Dock's getTextEditors() method calls
this.paneContainer.getTextEditors(), but there is no getTextEditors()
method on this.paneContainer. 🙈
This commit adds a test for observeTextEditors, and it adds the missing
onDidAddTextEditor method, and it fixes the getTextEditors method to
make the new test pass.