diff options
author | Skyler Hawthorne | 2022-10-21 07:43:22 +0000 |
---|---|---|
committer | GitHub | 2022-10-21 07:43:22 +0000 |
commit | 5a848344a9b6f476922ea004e6a7f5b6d32ef768 (patch) | |
tree | 6e5fcfb5a80bb188393a011f6a99e93c985f1026 /runtime/themes/onelight.toml | |
parent | bad49ef2d095cca88a9e0bd39da329b86bda3d75 (diff) |
fix: write-all crash (#4384)
When we do auto formatting, the code that takes the LSP's response and applies
the changes to the document are just getting the currently focused view and
giving that to the function, basically always assuming that the document that
we're applying the change to is in focus, and not in a background view.
This is usually fine for a single view, even if it's a buffer in the
background, because it's still the same view and the selection will get updated
accordingly for when you switch back to it. But it's obviously a problem for
when there are multiple views, because if you don't have the target document in
focus, it will ask the document to update the wrong view, hence the crash.
The problem with this is picking which view to apply any selection change to.
In the absence of any more data points on the views themselves, we simply pick
the first view associated with the document we are saving.
Diffstat (limited to 'runtime/themes/onelight.toml')
0 files changed, 0 insertions, 0 deletions