This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [sqlx](https://redirect.github.com/launchbadge/sqlx) |
dev-dependencies | patch | `0.8.2` -> `0.8.3` |
| [sqlx](https://redirect.github.com/launchbadge/sqlx) | dependencies |
patch | `0.8.2` -> `0.8.3` |
---
### Release Notes
<details>
<summary>launchbadge/sqlx (sqlx)</summary>
###
[`v0.8.3`](https://redirect.github.com/launchbadge/sqlx/blob/HEAD/CHANGELOG.md#083---2025-01-03)
[Compare
Source](https://redirect.github.com/launchbadge/sqlx/compare/v0.8.2...v0.8.3)
41 pull requests were merged this release cycle.
##### Added
- \[[#​3418]]: parse timezone parameter in mysql connection url
\[\[[@​dojiong](https://redirect.github.com/dojiong)]]
- \[[#​3491]]: chore: Update async-std v1.13
\[\[[@​jayvdb](https://redirect.github.com/jayvdb)]]
- \[[#​3492]]: expose relation_id and relation_attribution_no on
PgColumn
\[\[[@​kurtbuilds](https://redirect.github.com/kurtbuilds)]]
- \[[#​3493]]: doc(sqlite): document behavior for zoned date-time
types \[\[[@​abonander](https://redirect.github.com/abonander)]]
- \[[#​3500]]: Add sqlite commit and rollback hooks
\[\[[@​gridbox](https://redirect.github.com/gridbox)]]
- \[[#​3505]]: chore(mysql): create test for passwordless auth
([#​3484](https://redirect.github.com/launchbadge/sqlx/issues/3484))
\[\[[@​abonander](https://redirect.github.com/abonander)]]
- \[[#​3507]]: Add a "sqlite-unbundled" feature that dynamically
links to system libsqlite3.so library
\[\[[@​lilydjwg](https://redirect.github.com/lilydjwg)]]
- \[[#​3508]]: doc(sqlite): show how to turn options into a pool
\[\[[@​M3t0r](https://redirect.github.com/M3t0r)]]
- \[[#​3514]]: Support PgHstore by default in macros
\[\[[@​joeydewaal](https://redirect.github.com/joeydewaal)]]
- \[[#​3550]]: Implement Acquire for PgListener
\[\[[@​sandhose](https://redirect.github.com/sandhose)]]
- \[[#​3551]]: Support building with rustls but native
certificates
\[\[[@​IlyaBizyaev](https://redirect.github.com/IlyaBizyaev)]]
- \[[#​3553]]: Add support for Postgres lquery arrays
\[\[[@​philipcristiano](https://redirect.github.com/philipcristiano)]]
- \[[#​3560]]: Add PgListener::next_buffered(), to support batch
processing of notifications
\[\[[@​chanks](https://redirect.github.com/chanks)]]
- \[[#​3577]]: Derive Copy where possible for database-specific
types \[\[[@​veigaribo](https://redirect.github.com/veigaribo)]]
- \[[#​3579]]: Reexport AnyTypeInfoKind
\[\[[@​Norlock](https://redirect.github.com/Norlock)]]
- \[[#​3580]]: doc(mysql): document difference between `Uuid` and
`uuid::fmt::Hyphenated`
\[\[[@​abonander](https://redirect.github.com/abonander)]]
- \[[#​3583]]: feat: point
\[\[[@​jayy-lmao](https://redirect.github.com/jayy-lmao)]]
- \[[#​3608]]: Implement AnyQueryResult for Sqlite and MySQL
\[\[[@​pxp9](https://redirect.github.com/pxp9)]]
- \[[#​3623]]: feat: add geometry line
\[\[[@​jayy-lmao](https://redirect.github.com/jayy-lmao)]]
- \[[#​3658]]: feat: add Transaction type aliases
\[\[[@​joeydewaal](https://redirect.github.com/joeydewaal)]]
##### Changed
- \[[#​3519]]: Remove unused dependencies from sqlx-core, sqlx-cli
and sqlx-postgres
\[\[[@​vsuryamurthy](https://redirect.github.com/vsuryamurthy)]]
- \[[#​3529]]: Box Pgconnection fields
\[\[[@​joeydewaal](https://redirect.github.com/joeydewaal)]]
- \[[#​3548]]: Demote `.pgpass` file warning to a debug message.
\[\[[@​denschub](https://redirect.github.com/denschub)]]
- \[[#​3585]]: Eagerly reconnect in `PgListener::try_recv`
\[\[[@​swlynch99](https://redirect.github.com/swlynch99)]]
- \[[#​3596]]: Bump thiserror to v2.0.0
\[\[[@​paolobarbolini](https://redirect.github.com/paolobarbolini)]]
- \[[#​3605]]: Use `UNION ALL` instead of `UNION` in nullable
check \[\[[@​Suficio](https://redirect.github.com/Suficio)]]
- \[[#​3629]]: chore: remove BoxFuture's (non-breaking)
\[\[[@​joeydewaal](https://redirect.github.com/joeydewaal)]]
- \[[#​3632]]: Bump hashlink to v0.10
\[\[[@​paolobarbolini](https://redirect.github.com/paolobarbolini)]]
- \[[#​3643]]: Roll PostgreSQL 11..=15 tests to 13..=17
\[\[[@​paolobarbolini](https://redirect.github.com/paolobarbolini)]]
- \[[#​3648]]: close listener connection on TimedOut and
BrokenPipe errors
\[\[[@​DXist](https://redirect.github.com/DXist)]]
- \[[#​3649]]: Bump hashbrown to v0.15
\[\[[@​paolobarbolini](https://redirect.github.com/paolobarbolini)]]
##### Fixed
- \[[#​3528]]: fix: obey `no-transaction` flag in down migrations
\[\[[@​manifest](https://redirect.github.com/manifest)]]
- \[[#​3536]]: fix: using sqlx::test macro inside macro's
\[\[[@​joeydewaal](https://redirect.github.com/joeydewaal)]]
- \[[#​3545]]: fix: remove `sqlformat`
\[\[[@​tbar4](https://redirect.github.com/tbar4)]]
- \[[#​3558]]: fix: fix example code of `query_as`
\[\[[@​xuehaonan27](https://redirect.github.com/xuehaonan27)]]
- \[[#​3566]]: Fix: Cannot query Postgres `INTERVAL[]`
\[\[[@​Ddystopia](https://redirect.github.com/Ddystopia)]]
- \[[#​3593]]: fix: URL decode database name when parsing
connection url
\[\[[@​BenoitRanque](https://redirect.github.com/BenoitRanque)]]
- \[[#​3601]]: Remove default-features = false from url
\[\[[@​hsivonen](https://redirect.github.com/hsivonen)]]
- \[[#​3604]]: Fix mistake in sqlx::test fixtures docs
\[\[[@​andreweggleston](https://redirect.github.com/andreweggleston)]]
- \[[#​3612]]: fix(mysql): percent-decode database name
\[\[[@​abonander](https://redirect.github.com/abonander)]]
- \[[#​3640]]: Dont use `EXPLAIN` in nullability check for QuestDB
\[\[[@​Suficio](https://redirect.github.com/Suficio)]]
[#​3418]: https://redirect.github.com/launchbadge/sqlx/pull/3418
[#​3478]: https://redirect.github.com/launchbadge/sqlx/pull/3478
[#​3491]: https://redirect.github.com/launchbadge/sqlx/pull/3491
[#​3492]: https://redirect.github.com/launchbadge/sqlx/pull/3492
[#​3493]: https://redirect.github.com/launchbadge/sqlx/pull/3493
[#​3500]: https://redirect.github.com/launchbadge/sqlx/pull/3500
[#​3505]: https://redirect.github.com/launchbadge/sqlx/pull/3505
[#​3507]: https://redirect.github.com/launchbadge/sqlx/pull/3507
[#​3508]: https://redirect.github.com/launchbadge/sqlx/pull/3508
[#​3514]: https://redirect.github.com/launchbadge/sqlx/pull/3514
[#​3519]: https://redirect.github.com/launchbadge/sqlx/pull/3519
[#​3528]: https://redirect.github.com/launchbadge/sqlx/pull/3528
[#​3529]: https://redirect.github.com/launchbadge/sqlx/pull/3529
[#​3536]: https://redirect.github.com/launchbadge/sqlx/pull/3536
[#​3545]: https://redirect.github.com/launchbadge/sqlx/pull/3545
[#​3548]: https://redirect.github.com/launchbadge/sqlx/pull/3548
[#​3550]: https://redirect.github.com/launchbadge/sqlx/pull/3550
[#​3551]: https://redirect.github.com/launchbadge/sqlx/pull/3551
[#​3553]: https://redirect.github.com/launchbadge/sqlx/pull/3553
[#​3558]: https://redirect.github.com/launchbadge/sqlx/pull/3558
[#​3560]: https://redirect.github.com/launchbadge/sqlx/pull/3560
[#​3566]: https://redirect.github.com/launchbadge/sqlx/pull/3566
[#​3577]: https://redirect.github.com/launchbadge/sqlx/pull/3577
[#​3579]: https://redirect.github.com/launchbadge/sqlx/pull/3579
[#​3580]: https://redirect.github.com/launchbadge/sqlx/pull/3580
[#​3583]: https://redirect.github.com/launchbadge/sqlx/pull/3583
[#​3585]: https://redirect.github.com/launchbadge/sqlx/pull/3585
[#​3593]: https://redirect.github.com/launchbadge/sqlx/pull/3593
[#​3596]: https://redirect.github.com/launchbadge/sqlx/pull/3596
[#​3601]: https://redirect.github.com/launchbadge/sqlx/pull/3601
[#​3604]: https://redirect.github.com/launchbadge/sqlx/pull/3604
[#​3605]: https://redirect.github.com/launchbadge/sqlx/pull/3605
[#​3608]: https://redirect.github.com/launchbadge/sqlx/pull/3608
[#​3612]: https://redirect.github.com/launchbadge/sqlx/pull/3612
[#​3623]: https://redirect.github.com/launchbadge/sqlx/pull/3623
[#​3629]: https://redirect.github.com/launchbadge/sqlx/pull/3629
[#​3632]: https://redirect.github.com/launchbadge/sqlx/pull/3632
[#​3640]: https://redirect.github.com/launchbadge/sqlx/pull/3640
[#​3643]: https://redirect.github.com/launchbadge/sqlx/pull/3643
[#​3648]: https://redirect.github.com/launchbadge/sqlx/pull/3648
[#​3649]: https://redirect.github.com/launchbadge/sqlx/pull/3649
[#​3658]: https://redirect.github.com/launchbadge/sqlx/pull/3658
</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 these
updates again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
Release Notes:
- N/A
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate[bot]
and
renovate[bot]
created
7999165
windows: Refactor mouse events related code (#23729)
Click to expand commit body
Release Notes:
- N/A
张小白
created
e083679
windows: Prefer `WM_SETTINGCHANGE` when handing theme changed events (#23727)
Click to expand commit body
I recently noticed that on my Windows 11 machine, Zed no longer receive
the `WM_DWMCOLORIZATIONCOLORCHANGED` message when the system theme
changes. This functionality was present in the past. While this change
might be unexpected, it's understandable given Microsoft's history of
system updates.
This pull request proposes an alternative approach using the
`WM_SETTINGCHANGE` message to handle theme changes.
Release Notes:
- N/A
张小白
created
1b88734
Flag issues as stale more aggressively (#23761)
Click to expand commit body
We used to wait 6 months to close stale issues. Jono suggested 1 month.
I'm sort of splitting the difference and adding a bit of buffer. We can
adjust again later on, if we want.
Release Notes:
- N/A
Joseph T. Lyons
created
3eba831
Fix `closest_index_for_x` to get correct offset when only 1 char (#23603)
Click to expand commit body
Release Notes:
- N/A
----------
This bug can easy to replay by `input` example, just enter 1 char and
click on the middle of the char, we can't move cursor to 0, it is always
be 1.
```bash
cargo run -p gpui --example input
```
## Before
https://github.com/user-attachments/assets/3239dd47-278e-4311-9757-5165d1ccd796
## After
https://github.com/user-attachments/assets/4e2c1500-0142-4e28-bf34-7ef1f4929925
d090cac
workspace: Prefer active window over other local non-collab windows for opening file (#23726)
Click to expand commit body
Closes #21625 #17401 #16426
This is how the opening of a file works currently:
1. We first check if the file is part of any existing worktree. If it
is, we focus on that file in the worktree, and the window is activated.
2. If the file is not part of any worktree, we open it in the first
local non-collab workspace we find and activate that window. This is the
bug that the issues are based on.
This PR fixes it by modifying the second part of the above step, where
the file is not part of any worktree. Now, we will first open the file
in the active window, but only if the active window is local and
non-collab. This resolves the issue. If the file can't be opened in the
active window due to the local non-collab check, we will carry out the
existing logic of opening the file in whichever window is local and
non-collab.
I have tested this using the "workspace::OpenFiles" action, and
"workspace::Open" also uses the same method. That is, it will work on
all platforms.
Future: Some users also mentioned there should be a setting for whether
we should open a non-workspace file in the existing window or in a
separate new window. However, this seems out of scope, and a new issue
should be created for this.
#9370 is related, but this likely doesn't fix it, as it deals with how
macOS Finder's "Open with" handles files. I don't have macOS to test,
but this PR won't resolve it if Finder always opens a new window.
Release Notes:
- Fixed the issue where a file outside of the workspace was opening in a
random window instead of the last active window.
tims
created
7deafda
Fix run indicators with expanded diff hunks (#23758)
Click to expand commit body
Fix runnable positioning when diff hunks are altered.
Release Notes:
- N/A
Conrad Irwin
created
ee5f270
Fix unnecessarily large edits emitted from multi buffer on diff recalculation (#23753)
Click to expand commit body
This fixes an issue introduced in #22994 where soft wrap would
recalculate for the entire buffer when editing.
Release Notes:
- N/A
---------
Co-authored-by: Conrad <conrad@zed.dev>
Max Brunsfeld
and
Conrad
created
5331418
pane: Add settings to hide the tab bar buttons (#23752)
Click to expand commit body
This PR adds the `show_tab_bar_buttons` under `tab_bar` that allows
hiding the "New", "Split Pane", and "Zoom" buttons to the left of the
pane tab bar.
Release Notes:
- Added a new `show_tab_bar_buttons` setting, under `tab_bar`, that
enables hiding the pane tab bar buttons.
This PR adds really tiny visual adjustments to the assistant 2. I guess
the most note-worthy thing here is that I separated the `title` for
History views into two just because I wanted to render the `/` smaller
and lighter. 😬
Release Notes:
- N/A
Danilo Leal
created
06424c9
Update actions to open GitHub issue templates (#23747)
Fix bugs caused by the window context PR, where the window could be on
the stack and is then requested from the App.
This PR also adds derive macros for `AppContext` and `VisualContext` so
that it's easy to define further contexts in API code, such as
`editor::BlockContext`.
Release Notes:
- N/A
- Added support for DeepSeek as a new language model provider in Zed
Assistant
- Implemented streaming API support for real-time responses from
DeepSeek models.
- Added a configuration UI for DeepSeek API key management and settings.
- Updated documentation with detailed setup instructions for DeepSeek
integration.
- Added DeepSeek-specific icons and model definitions for seamless
integration into the Zed UI.
- Integrated DeepSeek into the language model registry, making it
available alongside other providers like OpenAI and Anthropic.
Release Notes:
- Added support for DeepSeek to the Assistant.
---------
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
邻二氮杂菲
and
Marshall Bowers
created
f096a28
assistant2: Don't block `ThreadStore` initialization on reloading the threads (#23728)
Click to expand commit body
This PR changes the `ThreadStore` constructor to not block on reloading
the threads before we finish initializing it.
This allows us to make the constructor synchronous instead of
asynchronous.
Release Notes:
- N/A
Marshall Bowers
created
9705764
assistant2: Fix opening the configuration via the button (#23732)
Click to expand commit body
This PR fixes an issues where clicking the "Open Configuration" button
wasn't opening the configuration.
We needed to change how the action was dispatched after #22632.
Release Notes:
- N/A
ad49f71
assistant2: Add debug logging for initialization issues (#23722)
Click to expand commit body
This PR adds some logging so we can debug the issues some folks have
been having with Assistant2 not getting initialized properly.
All the logs are prefixed with `[assistant2-debug]` so they're easier to
pick out of the logs, as well as find them later to clean up once we've
diagnosed the issue.
Release Notes:
- N/A
Marshall Bowers
created
98ea058
assistant: Preserve selection focus in the model selector (#23713)
Click to expand commit body
This PR fixes an incorrect behavior in the model selector where we were
removing the focus from the selected item back to the very first item of
the list. Now, if you click/hit return on an item, focus is preserved
there. In other words, focus is always initially in the selected item.
### Before
https://github.com/user-attachments/assets/62b72b1f-4e32-4b4a-adff-dcf9a2c13a28
### After
https://github.com/user-attachments/assets/a8528933-da01-481a-96f3-0173a39a03c0
Release Notes:
- N/A
Danilo Leal
created
93b62e0
assistant: Fix model selector label shift (#23717)
Click to expand commit body
This PR caps the width of the model label in the selector trigger to a
certain size. This is fix the behavior of the popover dancing around,
given its popover position is anchored to a certain edge of the trigger,
and if the trigger size increases while you select different models with
different name lengths, the popover dances around.
### Before
https://github.com/user-attachments/assets/0854fa2b-9eb2-45fb-886d-bde1cd644dcf
### After
Note how even though the second item has the largest label, the popover
stays in place.
https://github.com/user-attachments/assets/06b60030-65dc-4f06-b486-3045042bbff0
Fixing that then means truncating the model name to keep it constrained
into a max-width.
<img width="500" alt="Screenshot 2025-01-27 at 11 38 14 AM"
src="https://github.com/user-attachments/assets/94ce9cc6-848c-4dac-86b8-321da75c3af3"
/>
Release Notes:
- N/A
Danilo Leal
created
91f4472
assistant2: Fix model selector position (#23721)
Click to expand commit body
This PR makes the model selector not render on top of its trigger.
<img width="800" alt="Screenshot 2025-01-27 at 12 02 01 PM"
src="https://github.com/user-attachments/assets/76c5ac6f-ae27-4b3d-a80a-3027042c75f8"
/>
Release Notes:
- N/A
Danilo Leal
created
b58c994
docs: Example OpenAI model config missing version key (#23720)
Peter Tripp
created
9f3dbd6
Make ZED_WORKTREE_ROOT always point to a directory or is not set (#23150)
Click to expand commit body
When the out-of-tree file like `tasks.json` is-focus, tasks spawn with `ZED_WORKTREE_ROOT` unset.
Andrew Borg (Kashin)
created
3392136
docs: Fix error in OpenAI configuring custom models (#23716)
Follow-up to: https://github.com/zed-industries/zed/pull/23425
Peter Tripp
created
5bde053
Avoid panics when normalizing completion label with invalid ranges (#23712)
Click to expand commit body
Dev builds show panics related to completion label normalization
<details>
<summary>Panic</summary>
```
index out of bounds: the len is 103 but the index is 103
zed::reliability::init_panic_hook::{{closure}}::h78130eff43c84f6f+110375521
std::panicking::rust_panic_with_hook::hfe205f6954b2c97b+87457752
std::panicking::begin_panic_handler::{{closure}}::h6cb44b3a50f28c44+87456967
std::sys::backtrace::__rust_end_short_backtrace::hf1c1f2a92799bb0e+87449337
rust_begin_unwind+87456084
core::panicking::panic_fmt::h3d8fc78294164da7+7033011
core::panicking::panic_bounds_check::h9397cb495d89a72d+7033511
project::lsp_store::ensure_uniform_list_compatible_label::haf80316ce11edd67+72663592
project::lsp_store::populate_labels_for_completions::{{closure}}::hc93c3c540ef7d2d6+72642960
project::lsp_store::LspStore::completions::{{closure}}::{{closure}}::hb4b5432e24432ca8+72336627
async_task::raw::RawTask<F,T,S,M>::run::hf444c3dc07dd583b+68504803
<gpui::platform::linux::wayland::client::WaylandClient as gpui::platform::linux::platform::LinuxClient>::run::hbf5a316eb781a10d+50646579
gpui::platform::linux::platform::<impl gpui::platform::Platform for P>::run::hc85518d4552fc4cd+50496669
gpui::app::App::run::hca4e2eaf984ca6f6+109905269
zed::main::h849467ac1a6d32c9+110413414
std::sys::backtrace::__rust_begin_short_backtrace::h81b5ee155a7cf505+110835475
std::rt::lang_start::{{closure}}::h48a83f884cfb6865+110834761
std::rt::lang_start_internal::h5e7c81cecd7f0954+87382485
main+110425932
__libc_start_call_main+22789462491720
__libc_start_main_alias_1+22789462491915
_start+10436606
```
</details>
This can only happen when either `label.runs` or `label.filter_range`
has a range that's larger than the label text, which is an error.
Instead of panicking, log such errors and fall back to last index (which
is not really helpful, but still).
Release Notes:
- N/A
Kirill Bulatov
created
06d00b9
gpui: Support windows dark mode title bar (#23700)
Click to expand commit body
This will allow Windows GPUI applications that utilise the native title
bar to support the dark mode variant when the system user has dark mode
enabled in their system settings. [Related Win32
information](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/ui/apply-windows-themes)
| Before | After |
| ------------- | ------------- |
|

|

|
Release Notes:
- N/A
---------
Co-authored-by: 张小白 <364772080@qq.com>
Matin Aniss
and
张小白
created
6293b20
Add auto-completion support for snippet files (#23698)
Click to expand commit body
Release Notes:
- Added auto-completion support for snippet files.

loczek
created
6e9ea47
Fix completions menu scroll when `y_flipped` and edit prediction arrives (#23580)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
9cae96f
Remove more references to 'model' in GPUI APIs (#23693)
Fix a bug where a GPUI macro still used `ModelContext`
Rename `AsyncAppContext` -> `AsyncApp`
Rename update_model, read_model, insert_model, and reserve_model to
update_entity, read_entity, insert_entity, and reserve_entity
Release Notes:
- N/A
Mikayla Maki
created
83141d0
Fix escaping of `alt-\` in docs for triggering inline completion (#23684)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
7d30dda
Restore the default release channel (#23671)
Click to expand commit body
Release Notes:
- N/A
Kirill Bulatov
created
0c8ee21
Clean up duplicate dock-retrieval code (#23670)
Click to expand commit body
Release Notes:
- N/A
Joseph T. Lyons
created
64a5153
collab: Make unsupported for MinGW toolchain (#23518)
Click to expand commit body
Closes #23451
reverts #23117 for MinGW. collab can't be compiled for MinGW because
webrtc itself doesn't support MinGW compilers
Release Notes:
- N/A
Maksim Bondarenkov
created
5d005a7
Canonicalize paths when running tests (#23655)
Click to expand commit body
In the Windows test environment, the paths generated by `temp_tree()`
are symlink paths, which causes certain tests to fail.
I later noticed that when opening a project, we seem to always use
`canonicalize` to normalize the paths, as shown here:
https://github.com/zed-industries/zed/pull/21039.
This PR adopts a similar approach for the test environment to address
the issue.
Release Notes:
- N/A
张小白
created
0f8e2e3
Remove scripts used in merging the refactoring (#23669)
Click to expand commit body
Release Notes:
- N/A
Michael Sloan
created
84b945e
Revert making keybinding display in Mac menus use standard precedence (#23661)
Click to expand commit body
Closes #23621
Change was in #23378. Also adds a comment to clarify why this is
inconsistent with all other uses of `bindings_for_action`.
Release Notes:
- N/A
Michael Sloan
created
6fca1d2
Eliminate GPUI View, ViewContext, and WindowContext types (#22632)
Click to expand commit body
There's still a bit more work to do on this, but this PR is compiling
(with warnings) after eliminating the key types. When the tasks below
are complete, this will be the new narrative for GPUI:
- `Entity<T>` - This replaces `View<T>`/`Model<T>`. It represents a unit
of state, and if `T` implements `Render`, then `Entity<T>` implements
`Element`.
- `&mut App` This replaces `AppContext` and represents the app.
- `&mut Context<T>` This replaces `ModelContext` and derefs to `App`. It
is provided by the framework when updating an entity.
- `&mut Window` Broken out of `&mut WindowContext` which no longer
exists. Every method that once took `&mut WindowContext` now takes `&mut
Window, &mut App` and every method that took `&mut ViewContext<T>` now
takes `&mut Window, &mut Context<T>`
Not pictured here are the two other failed attempts. It's been quite a
month!
Tasks:
- [x] Remove `View`, `ViewContext`, `WindowContext` and thread through
`Window`
- [x] [@cole-miller @mikayla-maki] Redraw window when entities change
- [x] [@cole-miller @mikayla-maki] Get examples and Zed running
- [x] [@cole-miller @mikayla-maki] Fix Zed rendering
- [x] [@mikayla-maki] Fix todo! macros and comments
- [x] Fix a bug where the editor would not be redrawn because of view
caching
- [x] remove publicness window.notify() and replace with
`AppContext::notify`
- [x] remove `observe_new_window_models`, replace with
`observe_new_models` with an optional window
- [x] Fix a bug where the project panel would not be redrawn because of
the wrong refresh() call being used
- [x] Fix the tests
- [x] Fix warnings by eliminating `Window` params or using `_`
- [x] Fix conflicts
- [x] Simplify generic code where possible
- [x] Rename types
- [ ] Update docs
### issues post merge
- [x] Issues switching between normal and insert mode
- [x] Assistant re-rendering failure
- [x] Vim test failures
- [x] Mac build issue
Release Notes:
- N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Joseph <joseph@zed.dev>
Co-authored-by: max <max@zed.dev>
Co-authored-by: Michael Sloan <michael@zed.dev>
Co-authored-by: Mikayla Maki <mikaylamaki@Mikaylas-MacBook-Pro.local>
Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
Co-authored-by: joão <joao@zed.dev>
Nathan Sobo
,
Antonio Scandurra
,
Cole Miller
,
Mikayla
,
Joseph
,
max
,
Michael Sloan
,
Mikayla Maki
,
Mikayla
, and
joão
created
21b4a0d
Adjust `editor: open excerpts split` key binding (#23646)
Click to expand commit body
The pattern in Zed and in other editors is to use `cmd` to modify some
file-opening action to open it in a split rather than in the current
pane.
- In the project pane, a `click` opens a file, and a `cmd-click` opens
it in a split
- In the file finder, `enter` opens the file, and a `cmd-enter` opens it
in a split
It makes sense to me that if `alt-enter` opens a file from the excerpt,
that `cmd-alt-enter` opens it in a split, following the pattern above.
Note: I'm not auto-merging this, as others might disagree.
Note: I didn't touch the Vim binding.
Release Notes:
- Breaking Change: Changed `editor: open excerpts split` key binding to
`cmd-alt-enter` on macOS and `ctrl-alt-enter` on Linux.
Closes https://github.com/zed-industries/zed/issues/12024
https://github.com/user-attachments/assets/60ea3dbd-b594-4bf5-a44d-4bff925b815f
* Fixes incorrect line selection for certain corner cases
Before:
<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/35aaee6c-c120-4bf1-9355-448a29d1b9b5"
/>
After:
<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/abd97339-4594-4e8e-8605-50d74581ae86"
/>
* Reworks https://github.com/zed-industries/zed/pull/16420 to display
selection length with less performance overhead.
Improves the performance more, doing a single selections loop instead of
two.
* Fixes incorrect caret position display when text contains UTF-8 chars
with size > 1
Also fixes tooltop values for this case
* Fixes go to line to treat UTF-8 chars with size > 1 properly when
navigating
* Adds a way to fill go to line text editor with its tooltip on `Tab`
Release Notes:
- Fixed incorrect UTF-8 characters handling in `GoToLine` and caret
position
Kirill Bulatov
created
7c0a39d
Add key binding for `editor: open selections in multibuffer` (#23648)
Click to expand commit body
Follow-up to: https://github.com/zed-industries/zed/pull/23644
- Existing: `alt-enter` to open files from multi-buffer selections
- New: `alt-enter` to open multi-buffer from file selections
I updated the original PR changelog line.
Release Notes:
- N/A
Joseph T. Lyons
created
392b95b
Use proper path separator for multi buffer headers (#23635)
New mechanism had introduced the following regressions:
* Windows tasks are not registering child exit properly, sometimes
getting stuck in dirty state (even with
https://github.com/zed-industries/zed/pull/23631):
https://github.com/user-attachments/assets/6d406f17-aa76-4012-9c3b-be72d6d5beae
* Overall, the terminal editing started to feel more sluggish, esp. in
regards to deletions (ctrl-w and backspace), tested on macOS:
https://github.com/user-attachments/assets/3a69fe2e-e394-45e8-8f51-0f5ac396cb24
Release Notes:
- N/A