Commit Graph

2250 Commits

Author SHA1 Message Date
张小白
60af9dd4b1
Add .SystemUIFont to font list (#15340)
As discussed in #15326, this font name should be included in the font
list since `settings.json` indicates that one can set the font to
`.SystemUIFont`.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-27 09:23:24 -04:00
Peter Tripp
d3d0c043f5
Support extended keys on Mac (insert, f13-f19) (#16921)
- Improved support for extended keyboards on Mac (F13-F19, Insert)
2024-08-27 09:09:57 -04:00
Piotr Osiewicz
226ec9d404
gpui: Fix performance of app menu opening with large # of windows (#16939)
This is officially my weirdest performance fix to date; With large # of
windows opening app menu could take a lot of time (we're talking few
seconds with 9 windows, a minute with 10 windows). The fix is to make
one method pub(crate).. What?

<img width="981" alt="image"
src="https://github.com/user-attachments/assets/83b26154-0acd-43ef-84b3-4b85cde36120">

We were spending most of the time on clear_pending_keystrokes, which -
funnily enough - called itself recursively. It turned out we have two
methods; `AppContext::clear_pending_keystrokes` and
WindowContext::clear_pending_keystrokes. The former calls the latter,
but - due to the fact that `WindowContext::clear_pending_keystrokes` is
private and `WindowContext` derefs to `AppContext` - `AppContext` one
ended up actually calling itself! The fix is plain and simple - marking
WindowContext one as pub(crate), so that it gets picked up as a method
to call over `AppContext::clear_pending_keystrokes`.

Closes #16895



Release Notes:

- Fixed app menu performance slowdowns when there are multiple windows
open.
2024-08-27 12:23:00 +02:00
apricotbucket28
29745ae229
blade: Align rasterized path bounds to whole pixels (#16784)
Related: https://github.com/zed-industries/zed/pull/15822

| Before | After |
| --- | --- |
|
![image](https://github.com/user-attachments/assets/4c4ed1e7-b639-44ce-b318-8cdaaee809ee)|
![image](https://github.com/user-attachments/assets/c2757528-eef3-4d21-9522-39b2597a96b7)
|
|
![image](https://github.com/user-attachments/assets/b70ee108-bea6-4e5e-9583-392d1163d236)
|
![image](https://github.com/user-attachments/assets/aefc1f0c-7bba-4287-a3f9-bbb9befb6a4c)
|

Release Notes:

- N/A
2024-08-27 01:26:59 +03:00
Kirill Bulatov
55dda0e6af
A set of small fixes (#16849)
* Linux Clippy lints fixed
* Zed local tasks are now simpler to rerun
* Zed's `release-fast` build profile keeps the debug info so it's
possible to properly debug things without altering the sources

Release Notes:

- N/A
2024-08-26 02:24:08 +03:00
Walter de Jong
14f8d3a33a
gpui: Send correct kill signal on Linux (#16797)
should be kill -0 (zero) instead

Related to #14291 and #14310

Release Notes:

- N/A
2024-08-24 22:11:06 +03:00
Jason Lee
938d93a64c
gpui: Add truncate and text_ellipsis to TextStyle (#14850)
Release Notes:

- N/A

Ref issue #4996

## Demo

```
cargo run -p gpui --example text_wrapper 
```



https://github.com/user-attachments/assets/a7fcebf7-f287-4517-960d-76b12722a2d7

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 14:02:51 -04:00
张小白
69e76a3bb9
Refactor all_font_names (#15345)
In the current code implementation, it seems that the only difference
between `all_font_names` and `all_font_families` is whether dynamically
loaded font resources are included. Specifically, `all_font_families`
returns the names of all system fonts, while `all_font_names` includes
both the system font names and the dynamically loaded font names. In
other words, `all_font_families` is a strict subset of `all_font_names`.
This is what I observed in my tests on macOS.

<img width="682" alt="截屏2024-07-28 00 49 29"
src="https://github.com/user-attachments/assets/47317c28-0074-49d2-bcfa-052cab13e335">

Related codes:
```rust
let x: HashSet<_> = self.all_font_names().into_iter().collect();
let y: HashSet<_> = self.all_font_families().into_iter().collect();
let only_in_x = x.difference(&y).collect::<Vec<_>>();
let only_in_y = y.difference(&x).collect::<Vec<_>>();
println!("=====================================");
println!("1 -> {:?}", only_in_x);
println!("-------------------------------------");
println!("2 -> {:?}", only_in_y);
```

Release Notes:

- N/A
2024-08-23 00:11:01 +02:00
Kyle Kelley
80c25960dd
repl: Set up a way to copy output from the REPL (#16649)
Closes #15494

Simple copy button to copy an individual output since selection is a bit
more work.

<img width="790" alt="image"
src="https://github.com/user-attachments/assets/4a7d8b69-70cc-428e-8fe3-b95386d341ee">


Release Notes:

- repl: Copy output from the REPL using a button

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-22 15:03:42 -07:00
apricotbucket28
b19356ac69
linux: Ignore benign error when cancelling file picker (#15553)
Fixes https://github.com/zed-industries/zed/issues/15485

This should be clearer on the `ashpd` side, but `ResponseError` comes
from the portal
[Response](https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.portal.Request.html#org-freedesktop-portal-request-response),
which means the request itself didn't fail. Ignoring the `Other` variant
here should be safe.

Release Notes:

- Linux: Fixed benign error being shown when cancelling file picker
([#15485](https://github.com/zed-industries/zed/issues/15485))
2024-08-22 14:43:02 -07:00
apricotbucket28
7523a7a437
wayland: Do not reset clipboard data offer on keyboard leave (#16126)
Closes #14415 
(also removed an unused serial while I was at it)

Release Notes:

- Linux: Fixed cross-window copy/paste not working in some Wayland
configurations.
2024-08-22 14:42:32 -07:00
apricotbucket28
e7c8dba54f
cosmic_text: Handle subpixel variants (#16238)
Closes https://github.com/zed-industries/zed/issues/14169, closes
https://github.com/zed-industries/zed/issues/14387


| Before  | After |
| --- | ---|
|
![image](https://github.com/user-attachments/assets/e7acbcbf-6384-49f8-bfe4-96d70d957df2)
|
![image](https://github.com/user-attachments/assets/704fac78-3946-4c5f-a02d-346653b77c5a)
|
|
![image](https://github.com/user-attachments/assets/50c40a23-47a8-4bc4-9a8c-df763df38f18)
|
![image](https://github.com/user-attachments/assets/37e5b1a6-0e16-4564-a47e-94f4e6d82c10)
|

Release Notes:

- Linux: Improved text rendering by handling subpixel positioning.
2024-08-22 15:17:56 -06:00
Cherry
feab1261c8
Fix some typos (#16623)
This PR fixes some typos I found in the source code.

Release Notes:

- N/A
2024-08-21 17:33:19 -04:00
Michael Angerman
406d3b413d
gpui: Remove extra "which" in comment (#16620)
Fix a typo in the comment...

Release Notes:

- N/A
2024-08-21 17:24:38 -04:00
Ikko Eltociear Ashimine
9f0438b540
gpui: Remove extra "the" in comment (#16608)
Release Notes:

- N/A
2024-08-21 14:07:51 -04:00
Sinan Gençoğlu
ff7017c308
Replace lazy_static with std::sync::LazyLock (#16066)
Closes #15860 

Since rust std now supports LazyLock replacing lazy_static with it
reduce the external dependency.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-20 14:27:33 -04:00
Marshall Bowers
8381b06d2d
gpui: Fix "cursor" typos (#16536)
This PR fixes some typos of the word "cursor" in `gpui`.

Release Notes:

- N/A
2024-08-20 13:49:15 -04:00
Nathan Sobo
11753914d7
Add a setting to show time to first window draw and frames per second in status bar (#16422)
I want to showcase Zed's performance via videos, and this seemed like a
good way to demonstrate it.


https://github.com/user-attachments/assets/f4a5fabc-efe7-4b48-9ba5-719882fdc856

Release Notes:

- On macOS, you can now set assign `performance.show_in_status_bar:
true` in your settings to show the time to the first window draw on
startup and then current FPS of the containing window's renderer.

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: David Soria Parra <167242713+dsp-ant@users.noreply.github.com>
Co-authored-by: Danny Hua <danny.hua@hey.com>
2024-08-18 15:22:19 -06:00
Max Brunsfeld
4c390b82fb
Make LanguageModel::use_any_tool return a stream of chunks (#16262)
This PR is a refactor to pave the way for allowing the user to view and
edit workflow step resolutions. I've made tool calls work more like
normal streaming completions for all providers. The `use_any_tool`
method returns a stream of strings (which contain chunks of JSON). I've
also done some minor cleanup of language model providers in general,
removing the duplication around handling streaming responses.

Release Notes:

- N/A
2024-08-14 18:02:46 -07: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
张小白
ac6bff12b9
windows: Remove unused dependencies (#15857)
I have removed some unused dependencies, reducing the total number of
packages during the build from 1141 to 1112. This should slightly
decrease the build time.

![Screenshot 2024-08-06
230726](https://github.com/user-attachments/assets/58a49fd4-4a0a-4026-b6b7-79b95529ec74)


Release Notes:

- N/A
2024-08-13 13:31:02 +03:00
Thorsten Ball
af36d4934c
assistant panel: Animate assistant label if message is pending (#16152)
This adds a pulsating effect to the assistant header in case the message
is pending.

The pulsating effect is capped between 0.2 and 1.0 and I tried (with the
help of Claude) to give it a "breathing" effect, since I found the
normal bounce a bit too much.

Also opted for setting the `alpha` on the `LabelLike` things, vs.
overwriting the color, since I think that's cleaner instead of exposing
the color and mutating that.


https://github.com/user-attachments/assets/4a94a1c5-8dc7-4c40-b30f-d92d112db7b5


Release Notes:

- N/A
2024-08-13 11:41:44 +02:00
Piotr Osiewicz
68ae347077
chore: Remove a bunch of unused structs (#16139)
Found by beta clippy.

Release Notes:

- N/A
2024-08-13 01:43:19 +02:00
Son
bab4da78b7
Fix corner radius when doing rounded_full (#15663)
Release Notes:

- Fixed issue when doing `rounded_full`, it should render a pill-shape
rect instead of current eye-shape.

For example with this code
`div().h_4().w_16().bg(rgb(0xffffff)).rounded_full()`

Current:

<img width="144" alt="image"
src="https://github.com/user-attachments/assets/f8b20c7c-d91f-4c20-9f38-d435f59e72b7">

Fixed:

<img width="172" alt="image"
src="https://github.com/user-attachments/assets/ff8bbe26-2b31-4ef1-a2fb-25b458386ffb">
2024-08-12 15:24:32 +02:00
Peter Tripp
eb3c4b0e46
Docs Party 2024 (#15876)
Co-authored-by: Raunak Raj <nkray21111983@gmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-08-09 13:37:54 -04:00
Son
f24f601e05
Adjust erf estimation function (#15423)
Release Notes:

- Fixed a (potential) small error in erf estimation. Technically, the
error is negligible.

I am not sure where the current calculation for erf come from and if it
is intended or a simple mistake. However it looks slightly different
from the official calculation, notably
[this](https://en.wikipedia.org/wiki/Error_function#Approximation_with_elementary_functions)
from Wikipedia.

I will add a comment if it is intended.
2024-08-07 14:12:26 +02:00
Joseph T. Lyons
a64906779b
Use vanity Discord link (#15880)
Release Notes:

- N/A
2024-08-06 16:55:51 -04:00
Jaakko Sirén
fb1cd7cae2
blade: Update to pick up Intel memory coherency fix & fix calling blade params (#15829)
Builds on @kvark's PR https://github.com/zed-industries/zed/pull/15781
by fixing call to Blades `create_texture_view` the arguments of which
had changed.


Picks up https://github.com/kvark/blade/pull/153

Release Notes:

- Fixed Zed flickering on Linux when using Intel graphics.
([#14101](https://github.com/zed-industries/zed/issues/14101)).

---------

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-06 11:33:18 +02:00
apricotbucket28
ab1fabef68
gpui: Align SVG sprites to whole pixels (#15822)
Related to https://github.com/zed-industries/zed/issues/12352 (and old
issue https://github.com/zed-industries/zed/issues/643)

This fixes visual glitches that could happen when rendering icons on
Linux and Windows (and in the Blade backend)


![image](https://github.com/user-attachments/assets/02646d1d-d35b-48be-89c9-189416510cf2)

![image](https://github.com/user-attachments/assets/ccf99867-25d2-40fb-8735-c540f8cf793a)

![image](https://github.com/user-attachments/assets/8d1124a3-669e-4be5-8b46-5dc2df14a28a)


Release Notes:

- Linux: Fixed visual glitches when rendering icons.
2024-08-05 12:43:23 -07:00
Antonio Scandurra
5b1ea7eda0
Clean up inline assist editor rendering (#15536)
Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-07-31 17:43:08 +02:00
apricotbucket28
8e6af73784
x11: Do not check hover state on properties change (#15518)
This fixes an issue where the window's hovered state would be incorrect,
causing the cursor not to update because it would think the window
wasn't hovered ([relevant
check](a03beeeb5b/crates/gpui/src/window.rs (L3016-L3017))).

The code here doesn't really seem to make sense, since there's already
the `XinputEnter` and `XinputLeave` events that indicate mouse focus
state on the window. The properties change event wouldn't necessarily
indicate when mouse focus changes.

Thanks @Emc2356 for reporting this on the Discord and helping figure out
the issue!
 
Release Notes:

- Linux: Fixed the cursor sometimes not changing on X11
2024-07-30 19:02:48 -07:00
Jason Lee
1982a5aed1
gpui: Improve img element to support load from Assets (#15482)
Release Notes:

- N/A


Currently, the `img` element provided by GPUI only supports FilePath or
URL, but in actual applications we need to let `img` load an image
embedded in Assets.

The `svg` element can currently support this, but `img` cannot.

For example:

We have such an Assets directory:

```
assets
|- icons
|- images
|--- foo.png
```

```rs
// If give a path, considered an Asset
img("images/foo.png");
// If give a URI, considered a Remote image
img("https://foo.bar/images/foo.png");
// If give a PathBuf, considered a Local file
img(PathBuf::from("path/to/foo.png"));
```


## Example test

```
cargo run -p gpui --example image 
```

<img width="827" alt="image"
src="https://github.com/user-attachments/assets/e45dcf7f-4626-4fb0-aca9-9b6e1045a952">

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-07-30 10:55:48 -04:00
Antonio Scandurra
fa19bc98ac
Provide user agent when performing HTTP requests (#15470)
Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-07-30 11:12:37 +02:00
Thorsten Ball
f58ef9b82b
zed: Persist window stack order across restarts (#15419)
This changes the workspace/session serialization to also persist the
order of windows across restarts.

Release Notes:

- Improved restoring of windows across restarts: the order of the
windows is now also restored. That means windows that were in the
foreground when Zed was quit will be in the foreground after restart.
(Right now only supported on Linux/X11, not on Linux/Wayland.)

Demo:



https://github.com/user-attachments/assets/0b8162f8-f06d-43df-88d3-c45d8460fb68
2024-07-29 17:05:56 +02:00
apricotbucket28
04e25525bf
x11: Fix window menu not showing (#15328)
Fixes
https://github.com/zed-industries/zed/issues/15245#issuecomment-2252790889

Release Notes:

- Linux: Fixed window menu not showing on X11
2024-07-27 12:29:48 -07:00
Matin Aniss
4bd935b409
gpui: Add support for animated images (#13809)
This PR adds support for animated images. The image requires a id for it
to actually animate across frames.

Currently it only has support for `GIF`, I tried adding decoding a
animated `WebP` into frames but it seems to error. This issue in the
image crate seems to document this
https://github.com/image-rs/image/issues/2263.

Not sure if this is the best way or the desired way for animated images
to work in GPUI but I would really like support for animated images.
Open to feedback.

Example Video:


https://github.com/zed-industries/zed/assets/76515905/011f790f-d070-499b-96c9-bbff141fb002



Closes https://github.com/zed-industries/zed/issues/9993

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan <nathan@zed.dev>
2024-07-27 14:05:37 +02:00
apricotbucket28
88653c4e3e
linux: Respect window_min_size property (#15314)
https://github.com/zed-industries/zed/pull/13126 added the
`window_min_size` property for window creation, but it was only
implemented for macOS. This PR implements the property on Linux as well.

Release Notes:

- N/A
2024-07-26 18:02:31 -07:00
Calin Martinconi
3751f67730
fix: Typos (#15313)
Fixed typos in the code base according with output from `codespell`
tool.

Release Notes:

- N/A
2024-07-26 17:52:37 -07:00
张小白
6af385c09e
windows: Fix some weird IME window panic (#15286)
Previously, we used messages greater than `WM_USER` to pass information
between `WindowsPlatform` and `WindowsWindow`. For example, to close a
window, we handled it as follows:
1. The window sends a message with `WM_USER + 2` to `WindowsPlatform`.
2. `WindowsPlatform`, upon receiving this message, casts the `lparam` to
`HWND` and closes the window.

According to Microsoft's documentation, it is safe to use values between
`WM_USER` and `0xBFFF` as messages. However, certain versions of
Microsoft's IME use `WM_USER + 2` for UNKNOWN purposes. This causes step
2 to be erroneously triggered. The IME window's `lparam` value could be
arbitrary, leading to an attempt to close an arbitrary `HWND` and
resulting in errors.

It is quite surprising that Microsoft indicates using `WM_USER + 2` is
safe, yet Microsoft itself breaks this convention. I mean, well done
Microsoft!

This PR addresses the issue by using the `wparam` with a specific random
value for validation purpose when sending the aforementioned message.
Before `WindowsPlatform` attempts to close the window, it will first
verify the `wparam` value.

Special thanks to @shenjackyuanjie for helping me on this.


Co-authored-by: shenjackyuanjie <3695888@qq.com>


Release Notes:

- Fixed weird panic when IME window is closing(#15185, #12563).

---------

Co-authored-by: shenjack <3695888@qq.com>
2024-07-26 17:40:55 -07:00
张小白
e6cd1cf22b
windows: Remove Send and Sync implementation of DirectWrite (#15263)
This PR uses the `AgileReference` provided by the `windows-rs` crate to
correctly implement `Send` and `Sync` for `DirectWrite`.

Release Notes:

- N/A
2024-07-26 16:46:06 -07: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
Conrad Irwin
3e31955b7f
SSH remote ui (#15129)
Still TODO:
* [x] hide this UI unless you have some ssh projects in settings
* [x] add the "open folder" flow with the new open picker
* [ ] integrate with recent projects / workspace restoration

Release Notes:

- N/A
2024-07-26 16:45:44 -06:00
Marshall Bowers
27f97ba762
settings_ui: Add font ligature settings controls (#15301)
This PR adds settings controls for changing whether ligatures are
enabled for the UI and buffer fonts.

Release Notes:

- N/A
2024-07-26 17:06:14 -04:00
renovate[bot]
f4bbbe69b4
Update Rust crate waker-fn to v1.2.0 (#15289)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [waker-fn](https://togithub.com/smol-rs/waker-fn) | dependencies |
minor | `1.1.0` -> `1.2.0` |

---

### Release Notes

<details>
<summary>smol-rs/waker-fn (waker-fn)</summary>

###
[`v1.2.0`](https://togithub.com/smol-rs/waker-fn/blob/HEAD/CHANGELOG.md#Version-120)

[Compare
Source](https://togithub.com/smol-rs/waker-fn/compare/v1.1.1...v1.2.0)

-   Add a new `portable-atomic` feature that allows for the usage of the
`portable-atomic` crate to implement `waker-fn`.
([#&#8203;10](https://togithub.com/smol-rs/waker-fn/issues/10))

###
[`v1.1.1`](https://togithub.com/smol-rs/waker-fn/blob/HEAD/CHANGELOG.md#Version-111)

[Compare
Source](https://togithub.com/smol-rs/waker-fn/compare/v1.1.0...v1.1.1)

- Reimplement using 100% safe code.
([#&#8203;7](https://togithub.com/smol-rs/waker-fn/issues/7))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone
America/New_York, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

Release Notes:

- N/A

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzguMCIsInVwZGF0ZWRJblZlciI6IjM3LjQzOC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-07-26 13:05:29 -04:00
Marshall Bowers
c937a2fcdd
ui: Add functions for generating textual representations of key bindings (#15287)
This PR adds some helper functions in the `ui` crate that can be used to
get textural representations of keystrokes or key bindings.

Release Notes:

- N/A
2024-07-26 12:52:59 -04:00
Kirill Bulatov
e830865eb1
Return an empty measurement instead of panicking (#15269)
Follow-up of https://github.com/zed-industries/zed/pull/15256

Returns zero size for no items to render.

Incorrect worktree state made the uniform list to have 0 items to
render, so
```Rust
let mut items = (self.render_items)(item_ix..item_ix + 1, cx);
let mut item_to_measure = items.pop().unwrap();
```
panicked as the first line returned an empty array despite a
single-element range provided.


Release Notes:

- N/A
2024-07-26 14:21:09 +03:00
Piotr Osiewicz
0d5de88c4b
chore: Bump Rust version to 1.80 (#15186)
Release Notes:

- N/A
2024-07-25 22:48:42 +02:00
张小白
f3ad754396
linux: Fix wrong names reported by all_font_names (#14865)
The names suggested by `buffer_font_family` are reported by
`all_font_names`. Therefore, `all_font_names` should report family names
rather than postscript names.

close #14854 

Release Notes:

- N/A
2024-07-25 11:53:22 -07:00
Piotr Osiewicz
86456ce379
chore: Fix clippy violations from Cargo.toml (#15216)
/cc @maxdeviant 
Release Notes:

- N/A
2024-07-25 20:22:01 +02:00
Nathaniel
ab3c9f0678
windows: Allow horizontal scroll with shift + scroll (#14147)
Release Notes:

- Horizontally scroll when holding down the Shift key and using the
scroll wheel


https://github.com/zed-industries/zed/assets/95680272/e6480f9c-0f6a-4f47-b700-a3657a75716f
2024-07-25 10:44:35 -07:00