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

Fixed close tab and close window shortcut #1381

Merged
merged 4 commits into from
Jul 18, 2023

Conversation

FastestMolasses
Copy link
Member

Description

The command + w shortcut closes the editor instead of the current file. The functionality to close the current file was already implemented in CodeEdit/Features/Tabs/Views/TabBarItemView.swift. The fix was to remove this shortcut from CodeEdit/Features/WindowCommands/FileCommands.swift where it explicitly closes the editor. I moved this code to the correct keyboard shortcut (⌃⇧⌘W) which is the same as the one in Xcode.

Related Issues

Closes #1370

Checklist

  • I read and understood the contributing guide
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

@FastestMolasses
Copy link
Member Author

Looking back at this, the change I made by removing the shortcut from CodeEdit/Features/WindowCommands/FileCommands.swift means that it won't close the editor window when there are no open files. If instead you would like the editor to close when pressing "command + w" when theres no opened files, I can add this piece back in.

@jenslys
Copy link

jenslys commented Jul 17, 2023

Looking back at this, the change I made by removing the shortcut from CodeEdit/Features/WindowCommands/FileCommands.swift means that it won't close the editor window when there are no open files. If instead you would like the editor to close when pressing "command + w" when theres no opened files, I can add this piece back in.

I would prefer that cmd+w just closes the tabs. if there are no active tabs open, i press cmd+q to close the app.

others might disagree tho

@austincondiff austincondiff requested a review from a team July 18, 2023 02:25
@matthijseikelenboom matthijseikelenboom merged commit fddb150 into CodeEditApp:main Jul 18, 2023
2 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.

🐞 Command + w causes the code editor to close.
5 participants