This avoids a high cost which appears to be the system rasterizing the
cursor every time we call this, fixes a slowdown when scrolling rapidly
while mouse motion continually attempted to assign the style
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Z-2357
I've found a crate that handles both comments and trailing commas in
JSON. It is a fork of `serde_json`, but it is maintained & up-to-date.
Sadly RawValue seems to not play nicely with it; I've ran into
deserialisation issues around use of RawValue. For this PR I've migrated
to `Value` API.
Obviously this is just a point of discussion, not something I'd merge
straight away. There may be better solutions to this particular problem.
I've also noticed that `serde_json_lenient` does not handle trailing
commas after bindings array. I'm not sure how big of an issue that is.
Release Notes:
- Improved handling of trailing commas in settings files.
[#1322](https://github.com/zed-industries/community/issues/1322)
I'd like to follow up to allow roles to be cycled for the selected range
and support multi-cursors, but this is a start and contains a
refactoring, so going to merge.
Release Notes:
- Added the ability to cycle roles in the assistant with `ctrl-r`
When multiple panics occur at the same time (usually because one thread
panics, and another thread joins it), multiple panic JSON objects can
get written to the same panic file. The resulting file won't be valid
JSON.
This PR addresses that problem via two changes:
* Format panic files as single-line JSON objects
* When a panic file isn't valid JSON, try taking the first line
In the future, we could try combining all of the backtraces, but for
now, I just want to avoid a problem of not reporting a panic at all.
Release Notes:
- Fixed a problem with Zed's internal crash reporting.
This PR updates some dock behaviors. Now the toggle-dock commands
(cmd-j/b/r) also toggle focus. This also adds zoom serialization to the
docks.
Release Notes:
- Bug fix: Toggle dock commands (cmd-j/b/r) now move focus
- Bug fix: Dock zoom is now restored with the rest of the workspace
This fixes a regression introduced in
https://github.com/zed-industries/zed/pull/2560, where panic reports did
not include backtraces. The problem was that in that PR, I assumed we
could retrieve file paths for symbols in our backtraces. But actually,
that functionality only works when the app is built locally, and a
`.dSYM` file can be magically found by the OS. We don't ship those dSYM
files with Zed, so panic symbols do not have file paths available.
Panic backtraces will still be more useful and less noisy than before
though: we will strip out frames for which we don't have symbol names,
and remove leading panic-handling stack frames from the backtraces.
Release Notes:
- N/A