Do not render View menu when no documents are active#447
Merged
lhecker merged 4 commits intomicrosoft:mainfrom Jun 10, 2025
Merged
Do not render View menu when no documents are active#447lhecker merged 4 commits intomicrosoft:mainfrom
lhecker merged 4 commits intomicrosoft:mainfrom
Conversation
The status bar is blank when no documents are active, which makes sense since all the values on it are document specific. There for we can remove focus status bar from the View menu when no documents are active. Since this means all options in the View menu would be gone, we can also remove the menu entirely. Which is what we do for Edit also.
Contributor
Author
|
Note: If we add a keybind for focus status bar, issue #430 will come back. I'll look into ways we could fix that case also. |
Currently wants_statusbar_focus will only be reset once we actually steal focus, but this only happens if we're properly drawing the status bar. So if we're not drawing it, such as when no documents are open, we would keep this option active, until we finally do draw it, then we will switch focus unexpectedly.
Contributor
Author
|
@microsoft-github-policy-service agree |
Contributor
Author
|
I have added a second commit, which is a better fix to #430. Since they are related I've kept it in the same PR. But each commit is independent, so feel free to cherry pick just one of the commits. |
lhecker
approved these changes
Jun 10, 2025
DHowett
approved these changes
Jun 10, 2025
Lou32Verbose
pushed a commit
to Lou32Verbose/edit
that referenced
this pull request
Jan 11, 2026
Closes microsoft#430 Co-authored-by: Leonard Hecker <leonard@hecker.io>
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.
The status bar is blank when no documents are active, which makes sense since all the values on it are document specific. There for we can remove focus status bar from the View menu when no documents are active.
Since this means all options in the View menu would be gone, we can also remove the menu entirely. Which is what we do for Edit menu also.
Edit:
Added a second commit to always reset the focus status bar flags, even when the status bar is not being fully drawn. This ensures the focus is only set to the status bar immediately after pressing focus status bar, and not some time after.
An example scenario where this can happen is detailed in #430
Closes #430