project_panel: Fix autoscroll and filename editor focus race condition#42739
Merged
smitbarmase merged 2 commits intomainfrom Nov 14, 2025
Merged
project_panel: Fix autoscroll and filename editor focus race condition#42739smitbarmase merged 2 commits intomainfrom
smitbarmase merged 2 commits intomainfrom
Conversation
Member
Author
|
/cherry-pick stable |
github-actions bot
pushed a commit
that referenced
this pull request
Nov 20, 2025
#42739) Closes #40867 Since the recent changes in [https://github.com/zed-industries/zed/pull/38881](https://github.com/zed-industries/zed/pull/38881), the filename editor is sometimes not focused after duplicating a file or creating a new one, and similarly, autoscroll sometimes didn’t work. It turns out that multiple calls to `update_visible_entries_task` cancel the existing task, which might contain information about whether we need to focus the filename editor and autoscroll after the task ends. To fix this, we now carry that information forward to the next task that overwrites it, so that when the latest task ends, we can use that information to do the right thing. Release Notes: - Fixed an issue in the Project Panel where duplicating or creating an entry sometimes didn’t focus the rename editing field.
Contributor
|
🍒💥 Cherry-pick did not succeed |
zed-zippy bot
added a commit
that referenced
this pull request
Nov 20, 2025
#42739) (cherry-pick to stable) (#43130) Cherry-pick of #42739 to stable ---- Closes #40867 Since the recent changes in [https://github.com/zed-industries/zed/pull/38881](https://github.com/zed-industries/zed/pull/38881), the filename editor is sometimes not focused after duplicating a file or creating a new one, and similarly, autoscroll sometimes didn’t work. It turns out that multiple calls to `update_visible_entries_task` cancel the existing task, which might contain information about whether we need to focus the filename editor and autoscroll after the task ends. To fix this, we now carry that information forward to the next task that overwrites it, so that when the latest task ends, we can use that information to do the right thing. Release Notes: - Fixed an issue in the Project Panel where duplicating or creating an entry sometimes didn’t focus the rename editing field. Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
11happy
pushed a commit
to 11happy/zed
that referenced
this pull request
Dec 1, 2025
zed-industries#42739) Closes zed-industries#40867 Since the recent changes in [https://github.com/zed-industries/zed/pull/38881](https://github.com/zed-industries/zed/pull/38881), the filename editor is sometimes not focused after duplicating a file or creating a new one, and similarly, autoscroll sometimes didn’t work. It turns out that multiple calls to `update_visible_entries_task` cancel the existing task, which might contain information about whether we need to focus the filename editor and autoscroll after the task ends. To fix this, we now carry that information forward to the next task that overwrites it, so that when the latest task ends, we can use that information to do the right thing. Release Notes: - Fixed an issue in the Project Panel where duplicating or creating an entry sometimes didn’t focus the rename editing field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #40867
Since the recent changes in #38881, the filename editor is sometimes not focused after duplicating a file or creating a new one, and similarly, autoscroll sometimes didn’t work. It turns out that multiple calls to
update_visible_entries_taskcancel the existing task, which might contain information about whether we need to focus the filename editor and autoscroll after the task ends. To fix this, we now carry that information forward to the next task that overwrites it, so that when the latest task ends, we can use that information to do the right thing.Release Notes: