Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ac0116f

Browse files
committed
Show navigate to editor hint on status bar
When a PR is checked out and the diff view gets focus, show a navigate to editor hint on status bar.
1 parent cef9124 commit ac0116f

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/GitHub.App/Services/PullRequestEditorService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,12 @@ void EnableNavigateToEditor(ITextView textView, IPullRequestSession session, IPu
468468
{
469469
var view = vsEditorAdaptersFactory.GetViewAdapter(textView);
470470
EnableNavigateToEditor(view, session, file);
471+
472+
textView.GotAggregateFocus += (s, e) =>
473+
statusBar.ShowMessage(VisualStudio.UI.Resources.NavigateToEditorStatusMessage);
474+
475+
textView.LostAggregateFocus += (s, e) =>
476+
statusBar.ShowMessage(string.Empty);
471477
}
472478

473479
void EnableNavigateToEditor(IVsTextView textView, IPullRequestSession session, IPullRequestSessionFile file)

src/GitHub.VisualStudio.UI/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.VisualStudio.UI/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,7 @@
416416
<data name="AddSingleComment" xml:space="preserve">
417417
<value>Add a single comment</value>
418418
</data>
419+
<data name="NavigateToEditorStatusMessage" xml:space="preserve">
420+
<value>Press Enter to navigate to Editor</value>
421+
</data>
419422
</root>

0 commit comments

Comments
 (0)