Skip to content

settings_ui: Prevent panic when trying to configure edit prediction providers for language#47162

Merged
MrSubidubi merged 5 commits intomainfrom
settings-cleanup
Jan 20, 2026
Merged

settings_ui: Prevent panic when trying to configure edit prediction providers for language#47162
MrSubidubi merged 5 commits intomainfrom
settings-cleanup

Conversation

@MrSubidubi
Copy link
Member

Closes #46502

The issue here was that we were not looking into the sub page stack when looking headers up, resulting in an out of bounds index. This PR fixes this.

Due to me also fixing another small bug in the UI (and adding proper support for the breadcrumbs), I had to move quite some stuff around here to get this to work. Namely, I made the sub_page_stack a field on the SettingsWindow and now only store the active_language in a global to ensure that we store scroll positions properly for all sub pages. For that to work with the edit prediction provider page, I had to remove the struct there and could just move that into a method, which was a nice side effect there I suppose.

Release Notes:

  • Fixed a crash that could occur when trying to edit edit prediction providers in the settings UI.

@MrSubidubi MrSubidubi self-assigned this Jan 19, 2026
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 19, 2026
@MrSubidubi MrSubidubi enabled auto-merge (squash) January 20, 2026 00:16
@MrSubidubi
Copy link
Member Author

/cherry-pick preview

@MrSubidubi
Copy link
Member Author

/cherry-pick stable

@MrSubidubi MrSubidubi merged commit 09ceec0 into main Jan 20, 2026
27 checks passed
@MrSubidubi MrSubidubi deleted the settings-cleanup branch January 20, 2026 00:27
@zed-zippy
Copy link
Contributor

zed-zippy bot commented Jan 20, 2026

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/21155284462

@zed-zippy
Copy link
Contributor

zed-zippy bot commented Jan 20, 2026

🍒💥 Cherry-pick did not succeed
https://github.com/zed-industries/zed/actions/runs/21155284888

MrSubidubi added a commit that referenced this pull request Jan 20, 2026
…roviders for language (#47162)

Closes #46502

The issue here was that we were not looking into the sub page stack when
looking headers up, resulting in an out of bounds index. This PR fixes
this.

Due to me also fixing another small bug in the UI (and adding proper
support for the breadcrumbs), I had to move quite some stuff around here
to get this to work. Namely, I made the `sub_page_stack` a field on the
`SettingsWindow` and now only store the `active_language` in a global to
ensure that we store scroll positions properly for all sub pages. For
that to work with the edit prediction provider page, I had to remove the
struct there and could just move that into a method, which was a nice
side effect there I suppose.

Release Notes:

- Fixed a crash that could occur when trying to edit edit prediction
providers in the settings UI.
MrSubidubi added a commit that referenced this pull request Jan 20, 2026
…roviders for language (#47162)

Closes #46502

The issue here was that we were not looking into the sub page stack when
looking headers up, resulting in an out of bounds index. This PR fixes
this.

Due to me also fixing another small bug in the UI (and adding proper
support for the breadcrumbs), I had to move quite some stuff around here
to get this to work. Namely, I made the `sub_page_stack` a field on the
`SettingsWindow` and now only store the `active_language` in a global to
ensure that we store scroll positions properly for all sub pages. For
that to work with the edit prediction provider page, I had to remove the
struct there and could just move that into a method, which was a nice
side effect there I suppose.

Release Notes:

- Fixed a crash that could occur when trying to edit edit prediction
providers in the settings UI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in Settings

1 participant