Repository navigation
feat(app): hide the window with ⌘W - #15
Merged
Merged
Conversation
Escape walks the dismiss cascade and, in vim mode, deliberately stops short of hiding, leaving :q as the only way to put the note away from the keyboard. ⌘W is the macOS key for closing a window and already closes Settings, so bind it to a new HideWindow action that runs the same Hide Window command as :q, closing any open panel before hiding, and label that command ⌘W.
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 #12
Summary
Bind ⌘W to hide the window.
:qwas the only way to put the note away from the keyboard.HideWindowaction runs the sameIntent::Hideas:qand the Hide Window command, closing any open panel before hiding, so the three stay in step. The command is now labelled ⌘W under:.Tests
cmd_w_hides_the_window_in_every_mode_but_closes_settings_firstine2e/vim.rs: ⌘W resolves toHideWindowin vim normal, vim insert and non-vim mode, and toCloseSettingsunder the Settings context. It checks keymap resolution only, since the test platform cannot hide a window.the_table_gives_every_surface_the_same_labelsnow assertsIntent::Hideis labelled ⌘W and:wq(Then[Save, Hide]) has no label.cargo clippy --all-targets -- -D warningsis clean. The five e2e tests that fail on this branch also fail onmasterat 165bd2c, unrelated to this change.