Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostics: Fix losing focus when activating from diagnostics view #25517

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

5brian
Copy link
Contributor

@5brian 5brian commented Feb 24, 2025

Closes #25509

Changes:

  • Check if active item is already diagnostics, and set focus_item to false if so.

Instead of not focusing, should it just not activate instead? Something like:

        if !workspace
            .active_item(cx)
            .map(|item| item.item_id() == existing.item_id())
            .unwrap_or(false)
        {
            workspace.activate_item(&existing, true, true, window, cx);
        }

Release Notes:

  • N/A

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 24, 2025
@5brian 5brian marked this pull request as ready for review February 24, 2025 23:13
@Anthony-Eid
Copy link
Contributor

Anthony-Eid commented Feb 25, 2025

Thank you, I'm going to look into your activation question and see if I can get this merged in later today

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.

If already in Diagnostics View, triggering diagnostics: deploy again loses focus
2 participants