Skip to content

Fix "Show Edit Predictions For This Buffer" button#50845

Merged
probably-neb merged 1 commit intozed-industries:mainfrom
ayushk-1801:fix-edit-prediction-buffer
Mar 17, 2026
Merged

Fix "Show Edit Predictions For This Buffer" button#50845
probably-neb merged 1 commit intozed-industries:mainfrom
ayushk-1801:fix-edit-prediction-buffer

Conversation

@ayushk-1801
Copy link
Copy Markdown
Contributor

Closes #48393

When switching the language of an unsaved buffer (e.g., from Plain Text to JavaScript), the editor's edit_prediction_settings were not recalculated. This caused the "This Buffer" toggle in the edit prediction menu to show a stale state, making the first click a no-op. I added a call to update_edit_prediction_settings in the LanguageChanged event handler so the editor immediately reflects the correct edit prediction state for the new language.

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

Release Notes:

  • Fixed the "Show Edit Predictions For This Buffer" toggle being a no-op in unsaved buffers after switching the buffer's language.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 5, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 5, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Mar 6, 2026
@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
@probably-neb
Copy link
Copy Markdown
Collaborator

Nice work tracking this down, glad it was a simple fix!

@probably-neb probably-neb enabled auto-merge (squash) March 17, 2026 02:41
@probably-neb probably-neb merged commit 7788784 into zed-industries:main Mar 17, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Show Edit Predictions For This Buffer" button is a no-op in unsaved buffers

5 participants