Skip to content

web: don't close pinned tab on ctrl+w #7805

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

Merged
merged 2 commits into from
Apr 10, 2025

Conversation

01zulfi
Copy link
Collaborator

@01zulfi 01zulfi commented Mar 27, 2025

Signed-off-by: 01zulfi [email protected]

Closes #7776

@01zulfi 01zulfi requested a review from Copilot March 27, 2025 11:50
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents the closing of pinned tabs when the user presses ctrl+w.

  • Refactored the closeActiveTab method to retrieve the active tab object instead of only its id.
  • Added a check to skip closing tabs that are marked as pinned.

@01zulfi 01zulfi force-pushed the web/pinned-tab-close-shortcut branch from a74a9e0 to 3c19363 Compare March 28, 2025 09:41
@01zulfi 01zulfi requested review from thecodrr and Copilot March 28, 2025 09:41
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that when triggering the "close active tab" shortcut (ctrl+w/command+w), pinned tabs are not closed. Key changes include:

  • Refactoring the action handler for closing tabs to check for a pinned active tab.
  • Preventing the closure of pinned tabs by conditionally skipping the closeActiveTab() call.

@01zulfi 01zulfi requested a review from thecodrr April 10, 2025 05:35
@01zulfi 01zulfi force-pushed the web/pinned-tab-close-shortcut branch from 679497e to 67bedd5 Compare April 10, 2025 05:50
@01zulfi 01zulfi requested a review from thecodrr April 10, 2025 05:50
@thecodrr thecodrr merged commit 2b7b8d5 into streetwriters:master Apr 10, 2025
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pinned notes should not be closed by Ctrl+w
2 participants