This change fixes#13829 which reports that the `softWrapped` setting of
an untitled TextEditor is lost when the buffer is saved to a file. This
is caused by logic that updates TextEditor settings when the buffer's
language mode changes.
The fix is to preserve any TextEditor settings that would not change when
switching between the previous and current language mode of the buffer.
This commit fixes a race condition in the
`attemptRestoreProjectStateForPaths` function that could cause a file to
be opened more than once within the same workspace pane.
In particular, when opening some file into an empty window, Atom tries
to recover the state for the project containing the file (if there is
one). However, we were previously not waiting until the
`AtomEnvironment`'s state had been fully deserialized before trying to
load the requested file into the workspace. If the same file also
existed in the serialized representation of the workspace, it could end
up being opened twice.
With this commit we will now wait until the environment has been fully
deserialized before honoring the user's request of loading new files
into an empty window. Also, tests have been restructured to test more
thoroughly this interaction.
This is slower than it needs to be and creates behavioral problems when
selections get merged in some cases.
Signed-off-by: Nathan Sobo <nathan@github.com>
This fixes a bug most likely introduced with #16511 by ensuring that UI
elements (such as selections) never cover up the text.
Signed-off-by: Nathan Sobo <nathan@github.com>
This commit reverts a portion of the changes introduced in
9eac520e6a. Prior to that commit, we were
setting the tabIndex to -1 on the atom-text-editor element. This commit
restores that behavior.
Instead of setting a custom tab index directly on the atom-text-editor
element, we instead set the tabIndex on the input element *inside* the
atom-text-editor element.
With these changes in place, you can successfully use the tabIndex to
define the tab order for atom-text-editor elements. 😅