Commit Graph

491 Commits

Author SHA1 Message Date
Kirill Bulatov
f64f85eb1e
Do not hold any tasks by default and no other terminals (#16847) 2024-08-27 01:48:34 +03:00
Liang Kui
82090c60ca
Able to resolve URLs with query params in terminal (#16724)
<img width="207" alt="image"
src="https://github.com/user-attachments/assets/aa7d8de1-313b-4aae-a6c6-00b442b76fb8">

Release Notes:

- URLs with query parameters are now clickable in the terminal
2024-08-23 10:58:53 +03:00
Tau Gärtli
9245015d1a
terminal: Retain relative order of responses (#16456)
Partially addresses #8497 (namely, the occurring with `delta`)

As I mentioned in
https://github.com/zed-industries/zed/issues/8497#issuecomment-2226896371,
zed currently replies to OSC color requests (`OSC 10`, `OSC 11`, ...)
out of order when immediately followed by another request (for example
`CSI c`). All other terminals that [I have
tested](https://github.com/bash/terminal-colorsaurus/blob/main/doc/terminal-survey.md)
maintain relative order when replying to requests.

## Solution
Respond to the `ColorRequest` in `process_event` (in the same place
where other PTY writes happen) instead of queuing it up in the internal
event queue.

## Alternative
I initially thought that I could handle the color request similarly to
the `TextAreaSizeRequest` where the size is stored in `last_content` and
updated on `sync`. However this causes the terminal to report
out-of-date values when a "set color" sequence is followed by a color
request.

## Tests

1. `OSC 11; ?` (request bg color) + `CSI c` (request device attributes):
   ```shell
   printf '\e]11;?\e\\ \e[c' && cat -v
   # Expected result: ^[]11;rgb:dcdc/dcdc/dddd^[\^[[?6c
# Current result: ^[[?6c^[]11;rgb:dcdc/dcdc/dddd^[\ ()
# Result with this PR: ^[]11;rgb:dcdc/dcdc/dddd^[\^[[?6c ()
# Result with alternative: ^[]11;rgb:dcdc/dcdc/dddd^[\^[[?6c ()
   ```
2. `OSC 11; rgb:f0f0/f0f0/f0f0` (set bg color) + `OSC 11; ?` (request bg
color)
   ```shell
   printf '\e]11;rgb:f0f0/f0f0/f0f0\e\\ \e]11;?\e\\' && cat -v
   # Expected result: ^[]11;rgb:f0f0/f0f0/f0f0^[\
# Current result: ^[]11;rgb:f0f0/f0f0/f0f0^[\ ()
# Result with this PR: ^[]11;rgb:f0f0/f0f0/f0f0^[\ ()
# Result with alternative: ^[]11;rgb:OUT_OF_DATE_COLOR_HERE^[\ ()
   ```

Release Notes:

- N/A
2024-08-22 16:19:24 +02:00
Richard Feldman
b1a581e81b
Copy/paste images into editors (Mac only) (#15782)
For future reference: WIP branch of copy/pasting a mixture of images and
text: https://github.com/zed-industries/zed/tree/copy-paste-images -
we'll come back to that one after landing this one.

Release Notes:

- You can now paste images into the Assistant Panel to include them as
context. Currently works only on Mac, and with Anthropic models. Future
support is planned for more models, operating systems, and image
clipboard operations.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
2024-08-13 13:18:25 -04:00
Santeri Salmijärvi
06833d7360
Support MSbuild row-column format in PathWithPosition (#15589)
This implements #15412. Row-column parsing is changed into a regex to
support more complex patterns like the MSBuild diagnostics. Terminal
`word_regex` is also relaxed to match those suffixes.

Release Notes:

- N/A
2024-08-09 09:21:56 +02:00
Kyle Kelley
4528e9d582
repl: Create better terminal output for REPL stdio (#15715)
Rely on our implementation of a GPUI powered alacritty terminal to
render stdout & stderr from the repl.

Release Notes:

- Fixed ANSI escape code and carriage return handling in repl outputs
(https://github.com/zed-industries/zed/issues/15640,
https://github.com/zed-industries/zed/issues/14855)


https://github.com/user-attachments/assets/bd3f1584-863a-4afa-b60b-9d222a830ff8

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-03 05:48:16 -07:00
Peter Tripp
64bfec533e
Revert terminal: Add Alt key bindings for terminal (#15535)
- reverts commit 66ada3e44c.
- change default `option_as_meta` to true
2024-07-31 10:54:58 -04:00
CharlesChen0823
66ada3e44c
terminal: Add Alt key bindings for terminal (#14556)
- Makes using emacs-style alt/option/meta key shortcuts work in terminal (e.g. `M-%`)
- Fixes: #14543 

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-07-28 09:42:17 -04:00
Marshall Bowers
b8982ad385
Factor out construction of font-related JSON schemas (#15341)
This PR factors out the construction of the font-related JSON schemas,
as they were used in multiple places.

Release Notes:

- N/A
2024-07-27 12:28:50 -04:00
Marshall Bowers
1ffb34c5fc
Fix more instances of JSON schema getting clobbered when attaching references (#15339)
This PR extends the fix from #15336 to more places that had the same
issue.

An `add_references_to_properties` helper function has been added to
handle these cases uniformly.

Release Notes:

- N/A
2024-07-27 11:44:40 -04:00
Mikayla Maki
a1bd7a1297
Feature/fallback fonts (#15306)
Supersedes https://github.com/zed-industries/zed/pull/12090

fixes #5180
fixes #5055

See original PR for an example of the feature at work.

This PR changes the settings interface to be backwards compatible, and
adds the `ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks` settings.

Release Notes:

- Added support for font fallbacks via three new settings:
`ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks`.(#5180, #5055).

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
2024-07-26 16:42:21 -07:00
张小白
d2501e8886
windows: Bump windows-rs version (#14719)
Release Notes:

- N/A
2024-07-25 10:41:59 -07:00
Kirill Bulatov
b2b9d4ccb6
Extend task templates with shell and hide fields to use custom shells and custom close behavior (#15031) 2024-07-23 22:58:36 +03:00
Kirill Bulatov
dd63e25f23
Revert hold: true for macOS tasks (#14376)
Otherwise, ctrl-c makes them stuck being held from time to time

Follow-up of https://github.com/zed-industries/zed/pull/13898 that
reverts the macOS-related part of the PR.

Release Notes:

- N/A
2024-07-13 04:02:38 +03:00
Donough Liu
d49727ff10
terminal: Set TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables in integrated terminal (#14213)
![image](https://github.com/zed-industries/zed/assets/31354274/9d1c5410-897b-40a1-8256-2d7e207f69ff)

These two environment variables are essential when people need to detect
terminal type and do something. Many popular terminals set them.

fixes https://github.com/zed-industries/zed/issues/4571

Release Notes:

- Set `TERM_PROGRAM` and `TERM_PROGRAM_VERSION` environment variables in
the integrated terminal
([#4571](https://github.com/zed-industries/zed/issues/4571)).
2024-07-11 20:48:46 +03:00
Aleksei Gusev
f61abe0247
Pass hold: true to Alacritty for tasks (#13898)
It seems `hold: false` causes alacritty to close the channel earlier,
without waiting for the output from the child command to go to Zed.

Fixes [#13683](https://github.com/zed-industries/zed/issues/13683)

Release Notes:

- Fixed loosing output of a spawned task
([#13683](https://github.com/zed-industries/zed/issues/13683)).

[Screencast from 2024-07-06
18-28-56.webm](https://github.com/zed-industries/zed/assets/39293/4ebef8b5-7c0d-46be-9341-4ac0d809458d)
2024-07-11 17:50:00 +03:00
张小白
bef2586eed
windows: Fix rust tasks (#13413)
https://github.com/zed-industries/zed/assets/14981363/56c208da-132c-438a-92b3-e31505859262


Release Notes:

- N/A
2024-07-11 10:47:25 +02:00
Bennet Bo Fenner
e243856559
Add terminal inline assistant (#13638)
Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-01 20:53:56 +02:00
Aleksei Gusev
d5fbf75ccf
Add keyboard shortcuts for scrolling in terminal (#13508)
Fixes #4917, #12231

Release Notes:
-  Added keyboard shortcuts for scrolling in terminal ([4917](https://github.com/zed-industries/zed/issues/4917), [12231](https://github.com/zed-industries/zed/issues/12231))
2024-06-28 10:26:14 +03:00
Bennet Bo Fenner
0150192e26
assistant: Add term slash command (#13162)
This adds a `term` slash command to the assistant which allows to inject
the latest terminal output into the context.

Release Notes:

- N/A
2024-06-20 20:20:34 +02:00
Marshall Bowers
258a8a37d8
Extract paths out of util (#13182)
This PR extracts the definition of the various Zed paths out of `util`
and into a new `paths` crate.

`util` is for generic utils, while these paths are Zed-specific. For
instance, `gpui` depends on `util`, and it shouldn't have knowledge of
these paths, since they are only used by Zed.

Release Notes:

- N/A
2024-06-17 19:27:42 -04:00
Conrad Irwin
868284876d
Bump alacritty to fix some file descriptor yuck (#12687)
https://github.com/alacritty/alacritty/pull/7996

Release Notes:

- Fixed a crash caused by bad file descriptor lifetime handling.
2024-06-05 09:12:05 -06:00
apricotbucket28
959f0dcded
Fix terminal key bindings (#12558)
Fixes https://github.com/zed-industries/zed/issues/12556

Only changed the keymap on Linux since I'm not sure if the behaviour is
correct on macOS

Release Notes:

- N/A
2024-06-03 11:25:27 -07:00
Nathan Sobo
e19339bc1d
Allow UI font weight to be assigned in settings (#12333)
Release Notes:

- Added the ability to configure the weight of your UI font in standard
CSS weight units from 0 to 900.
2024-05-26 23:06:58 -06:00
Jakob Hellermann
b1cfd46d37
Fix ctrl click to open file on windows (#12294)
There were two issues:
1. the `ModifiersChanged` event was never emitted on windows.
macOS, x11 and wayland have separate events for this, while on windows
they are sent via the usual `keyup` and `keydown` events, but
`parse_keydown_msg_keystroke` just ignored them.
2. the word segmenting regex didn't include '\' so paths weren't
correctly detected

fixes https://github.com/zed-industries/zed/issues/12321

Release Notes:

- N/A
2024-05-26 16:57:35 -07:00
Kirill Bulatov
c4e87444e7
Tidy up the code (#12116)
Small follow-ups for https://github.com/zed-industries/zed/pull/12063
and https://github.com/zed-industries/zed/pull/12103

Release Notes:

- N/A
2024-05-22 14:36:15 +03:00
张小白
4ae3396253
Make primary clipboard Linux only (#11843)
I guess only Linux supports the primary clipboard.

Release Notes:

- N/A
2024-05-15 10:44:47 -07:00
CharlesChen0823
0a096bf531
terminal: Fix Alacritty key bindings (#11782)
Close #10502 

Release Notes:

- Fixed `ctrl-space` not being forwarded correctly in the terminal view.
([#10502](https://github.com/zed-industries/zed/issues/10502))
2024-05-14 11:09:21 +02:00
Conrad Irwin
4f9ba28a25
linux cli (#11585)
- [x] Build out cli on linux
- [x] Add support for --dev-server-token sent by the CLI
- [x] Package cli into the .tar.gz
- [x] Link the cli to ~/.local/bin in install.sh

Release Notes:

- linux: Add cli support for managing zed
2024-05-09 21:08:49 -06:00
Conrad Irwin
b487f2ce6f
Don't iterate over all system processes (#11281)
Release Notes:

- Fixed a UI beachball when gathering process information
2024-05-01 20:08:56 -06:00
hardlydearly
dfd4d2a437
chore: remove repetitive word (#10923) 2024-04-24 11:34:32 +03:00
Kirill Bulatov
13c17267b9
Properly pass nested script arguments for tasks (#10776)
Closes
https://github.com/zed-industries/zed/discussions/10732#discussion-6524347
introduced by https://github.com/zed-industries/zed/pull/10548 while
keeping both Python and Bash run selection capabilities.

Also replaced redundant `SpawnTask` struct with `SpawnInTerminal` that
has identical fields.

Release Notes:

- Fixed incorrect task escaping of nested script arguments

---------

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2024-04-19 16:24:35 +03:00
apricotbucket28
b31df39ab0
linux: Primary clipboard (#10534)
Implements copying from and pasting to the primary selection.

Release Notes:

- N/A
2024-04-18 14:54:18 -07:00
Kirill Bulatov
be2bf98529
Show task summary in its terminal after it stops running (#10615)
Based on https://github.com/alacritty/alacritty/issues/7795

Unknown error code commands (now includes the interrupted ones):

![image](https://github.com/zed-industries/zed/assets/2690773/801868bc-081c-453c-a353-233d4397bda9)

Successful command:

![image](https://github.com/zed-industries/zed/assets/2690773/874377c7-c967-4a6f-8a89-ec7bf398a8b3)

Unsuccessful command:

![image](https://github.com/zed-industries/zed/assets/2690773/6c99dc5d-d324-41e9-a71b-5d0bf705de27)

The "design", including wordings and special characters, is not final,
suggestions are welcome.
The main idea was to somehow distinguish the appended lines without
occupying extra vertical space.

Release Notes:

- Added task summary output into corresponding terminal tabs
2024-04-16 22:13:35 +03:00
Hans
2cfb1ffa77
add a setting to control show/hide terminal button for status bar (#10593)
Release Notes:

- Added a setting to show/hide the terminal button in the status bar:
`{"terminal": {"button": false}}` to hide it. (#10513)

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-04-16 09:40:32 +02:00
Kirill Bulatov
db48c75231
Add basic bash and Python tasks (#10548)
Part of https://github.com/zed-industries/zed/issues/5141

* adds "run selection" and "run file" tasks for bash and Python.
* replaces newlines with `\n` symbols in the human-readable task labels
* properly escapes task command arguments when spawning the task in
terminal

Caveats:

* bash tasks will always use user's default shell to spawn the
selections, but they should rather respect the shebang line even if it's
not selected
* Python tasks will always use `python3` to spawn its tasks now, as
there's no proper mechanism in Zed to deal with different Python
executables

Release Notes:

- Added tasks for bash and Python to execute selections and open files
in terminal
2024-04-15 16:07:21 +03:00
CharlesChen0823
4e6f24a841
Only emit resize event when size changed (#10419)
Currently, terminal will emit resize event every seconds, even if the
size not changed.
this PR fixed only emit resize event when size is changed.

Release Notes:

- N/A
2024-04-12 12:18:56 -07:00
Piotr Osiewicz
a1cbc23fee
task: use full task label to distinguish a terminal (#10469)
Spotted by @SomeoneToIgnore, in #10468 I've used a shortened task label,
which might lead to collisions.

Release Notes:

- N/A
2024-04-12 13:25:46 +02:00
Joseph T. Lyons
eb6f7c1240
Remove if-not-else patterns (#10402) 2024-04-11 03:48:06 -04:00
Kirill Bulatov
d1ad96782c
Rework task modal (#10341)
New list (used tasks are above the separator line, sorted by the usage
recency), then all language tasks, then project-local and global tasks
are listed.
Note that there are two test tasks (for `test_name_1` and `test_name_2`
functions) that are created from the same task template:
<img width="563" alt="Screenshot 2024-04-10 at 01 00 46"
src="https://github.com/zed-industries/zed/assets/2690773/7455a82f-2af2-47bf-99bd-d9c5a36e64ab">

Tasks are deduplicated by labels, with the used tasks left in case of
the conflict with the new tasks from the template:
<img width="555" alt="Screenshot 2024-04-10 at 01 01 06"
src="https://github.com/zed-industries/zed/assets/2690773/8f5a249e-abec-46ef-a991-08c6d0348648">

Regular recent tasks can be now removed too:
<img width="565" alt="Screenshot 2024-04-10 at 01 00 55"
src="https://github.com/zed-industries/zed/assets/2690773/0976b8fe-b5d7-4d2a-953d-1d8b1f216192">

When the caret is in the place where no function symbol could be
retrieved, no cargo tests for function are listed in tasks:
<img width="556" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/df30feba-fe27-4645-8be9-02afc70f02da">


Part of https://github.com/zed-industries/zed/issues/10132
Reworks the task code to simplify it and enable proper task labels.

* removes `trait Task`, renames `Definition` into `TaskTemplate` and use
that instead of `Arc<dyn Task>` everywhere
* implement more generic `TaskId` generation that depends on the
`TaskContext` and `TaskTemplate`
* remove `TaskId` out of the template and only create it after
"resolving" the template into the `ResolvedTask`: this way, task
templates, task state (`TaskContext`) and task "result" (resolved state)
are clearly separated and are not mixed
* implement the logic for filtering out non-related language tasks and
tasks that have non-resolved Zed task variables
* rework Zed template-vs-resolved-task display in modal: now all reruns
and recently used tasks are resolved tasks with "fixed" context (unless
configured otherwise in the task json) that are always shown, and Zed
can add on top tasks with different context that are derived from the
same template as the used, resolved tasks
* sort the tasks list better, showing more specific and least recently
used tasks higher
* shows a separator between used and unused tasks, allow removing the
used tasks same as the oneshot ones
* remote the Oneshot task source as redundant: all oneshot tasks are now
stored in the inventory's history
* when reusing the tasks as query in the modal, paste the expanded task
label now, show trimmed resolved label in the modal
* adjusts Rust and Elixir task labels to be more descriptive and closer
to bash scripts

Release Notes:

- Improved task modal ordering, run and deletion capabilities
2024-04-11 02:02:04 +03:00
Marshall Bowers
7c5bc3c26f
Add the ability for extensions to provide language settings (#10296)
This PR adds the ability for extensions to provide certain language
settings via the language `config.toml`.

These settings are then merged in with the rest of the settings when the
language is loaded from the extension.

The language settings that are available are:

- `tab_size`
- `hard_tabs`
- `soft_wrap`

Additionally, for bundled languages we moved these settings out of the
`settings/default.json` and into their respective `config.toml`s .

For languages currently provided by extensions, we are leaving the
values in the `settings/default.json` temporarily until all released
versions of Zed are able to load these settings from the extension.

---

Along the way we ended up refactoring the `Settings::load` method
slightly, introducing a new `SettingsSources` struct to better convey
where the settings are being loaded from.

This makes it easier to load settings from specific locations/sets of
locations in an explicit way.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-08 19:17:12 -04:00
Thorsten Ball
3a0d3cee87
Compute scrollbar markers asynchronously (#10080)
Refs #9647
Fixes https://github.com/zed-industries/zed/issues/9792

This pull request moves the computation of scrollbar markers off the
main thread, to prevent them from grinding the editor to a halt when we
have a lot of them (e.g., when there are lots of search results on a
large file). With these changes we also avoid generating multiple quads
for adjacent markers, thus fixing an issue where we stop drawing other
primitives because we've drawn too many quads in the scrollbar.

Release Notes:

- Improved editor performance when displaying lots of search results,
diagnostics, or symbol highlights in the scrollbar
([#9792](https://github.com/zed-industries/zed/issues/9792)).

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan <nathan@zed.dev>
2024-04-03 12:21:17 +02:00
Mikayla Maki
1da2441e7b
Fix assorted linux issues (#10061)
- Fix a bug where modifiers would be dispatched before they changed
- Add a secondary modifier
- Improve keybindings

Release Notes:

- N/A
2024-04-01 17:22:59 -07:00
白山風露
94c51c6ac9
Windows: Enable clippy deny warnings (#9920)
~Waiting #9918~

Release Notes:

- N/A
2024-03-28 11:55:35 -04:00
Kirill Bulatov
ce37885f49
Use different icons for terminal tasks (#9876) 2024-03-27 20:49:10 +01:00
Stanislav Alekseev
85fdcef564
Do not enable venv in terminal for bash-like oneshot task invocations (#8444)
Release Notes:
- Work around #8334 by only activating venv in the terminal not in tasks
(see #8440 for a proper solution)
- To use venv modify your tasks in the following way:
```json
{
  "label": "Python main.py",
  "command": "sh",
  "args": ["-c", "source .venv/bin/activate && python3 main.py"]
}
```

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-03-21 19:40:33 +02:00
apricotbucket28
d8e32c3e3c
linux: scrolling improvements (#9103)
This PR adjusts scrolling to be a lot faster on Linux and also makes
terminal scrolling work.

For Wayland, it makes scrolling faster by handling the `AxisValue120`
event (which also allows high-resolution scrolling on supported mice)
On X11, changed the 1 line per scroll to 3.

### Different solutions

I tried replicating Chromium's scrolling behaviour, but it was
inconsistent in X11/Wayland and found it too fast on Wayland. Plus, it
also didn't match VSCode, since it seems that they do something
different.

Release Notes:

- Made scrolling faster on Linux
- Made terminal scroll on Linux
2024-03-18 14:50:29 -07:00
Kirill Bulatov
dcdd1ece1c
Small improvements of the task terminal spawn behavior (#9399)
* Add a `reveal: always|never` field in task definitions from tasks.json
, allowing to customize task terminal behavior on spawn
* Ensure reveal: always reveals the terminal even if the old task is
already running


Release Notes:

- Added a `reveal: always|never` (`always` is a default) field in task
definitions from tasks.json , allowing to customize task terminal
behavior on spawn

---------

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2024-03-15 18:32:59 +02:00
dalton-oliveira
41d8ba12ec
Remove wezterm fork from dependencie (#8998)
Improves build time by removing wezterm dependency
([#8604](https://github.com/zed-industries/zed/issues/8604)).

Release Notes:

- N/A
2024-03-12 21:27:40 +02:00
Antonio Scandurra
4700d33728
Fix flickering (#9012)
See https://zed.dev/channel/gpui-536

Fixes https://github.com/zed-industries/zed/issues/9010
Fixes https://github.com/zed-industries/zed/issues/8883
Fixes https://github.com/zed-industries/zed/issues/8640
Fixes https://github.com/zed-industries/zed/issues/8598
Fixes https://github.com/zed-industries/zed/issues/8579
Fixes https://github.com/zed-industries/zed/issues/8363
Fixes https://github.com/zed-industries/zed/issues/8207


### Problem

After transitioning Zed to GPUI 2, we started noticing that interacting
with the mouse on many UI elements would lead to a pretty annoying
flicker. The main issue with the old approach was that hover state was
calculated based on the previous frame. That is, when computing whether
a given element was hovered in the current frame, we would use
information about the same element in the previous frame.

However, inspecting the previous frame tells us very little about what
should be hovered in the current frame, as elements in the current frame
may have changed significantly.

### Solution

This pull request's main contribution is the introduction of a new
`after_layout` phase when redrawing the window. The key idea is that
we'll give every element a chance to register a hitbox (see
`ElementContext::insert_hitbox`) before painting anything. Then, during
the `paint` phase, elements can determine whether they're the topmost
and draw their hover state accordingly.

We are also removing the ability to give an arbitrary z-index to
elements. Instead, we will follow the much simpler painter's algorithm.
That is, an element that gets painted after will be drawn on top of an
element that got painted earlier. Elements can still escape their
current "stacking context" by using the new `ElementContext::defer_draw`
method (see `Overlay` for an example). Elements drawn using this method
will still be logically considered as being children of their original
parent (for keybinding, focus and cache invalidation purposes) but their
layout and paint passes will be deferred until the currently-drawn
element is done.

With these changes we also reworked geometry batching within the
`Scene`. The new approach uses an AABB tree to determine geometry
occlusion, which allows the GPU to render non-overlapping geometry in
parallel.

### Performance

Performance is slightly better than on `main` even though this new
approach is more correct and we're maintaining an extra data structure
(the AABB tree).


![before_after](https://github.com/zed-industries/zed/assets/482957/c8120b07-1dbd-4776-834a-d040e569a71e)

Release Notes:

- Fixed a bug that was causing popovers to flicker.

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
2024-03-11 10:45:57 +01:00