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

Extra line included when `Open on GitHub` is called with a selection #1843

Closed
jcansdale opened this issue Aug 8, 2018 · 4 comments
Closed

Extra line included when `Open on GitHub` is called with a selection #1843

jcansdale opened this issue Aug 8, 2018 · 4 comments
Labels
Milestone

Comments

@jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Aug 8, 2018

  • GitHub Extension for Visual Studio version: 2.5.5

NOTE: Use the keyboard rather than the mouse to select:

  1. Select a range in the code editor
    image
  2. Right-click, GitHub > Open on GitHub
  • Browser opens with extra line selected
    image

Alternatively:

  1. Select a range in the code editor
    image
  2. Right-click, GitHub > Copy link to clipboard
  3. Right-click, GitHub > Open from clipboard
  • An extra line is selected
    image
@jcansdale jcansdale added this to Low Priority in BUGS Aug 8, 2018
@meaghanlewis meaghanlewis moved this from Low Priority to In Progress in BUGS Aug 8, 2018
@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Aug 8, 2018

Good catch!

@meaghanlewis
Copy link
Contributor

@meaghanlewis meaghanlewis commented Aug 8, 2018

Actually, I'm having a hard time reproducing this behavior. The right lines always seem to be highlighted for me.

@grokys
Copy link
Contributor

@grokys grokys commented Aug 9, 2018

@meaghanlewis i was able to repro by selecting the lines in @jcansdale's screenshots:

Clipboard.SetText(link);
var ns = ServiceProvider.TryGetService<IStatusBarNotificationService>();
ns?.ShowMessage(Resources.LinkCopiedToClipboardMessage);
await UsageTracker.IncrementCounter(x => x.NumberOfLinkToGitHub);
}

@jcansdale
Copy link
Collaborator Author

@jcansdale jcansdale commented Aug 9, 2018

Actually, I'm having a hard time reproducing this behavior. The right lines always seem to be highlighted for me.

You'll probably find this happens when using the keyboard rather than the mouse to select. The reason is that you'll tend to start (or end) the selection on the line below the selected area. If you start your selection at the bottom, this extra line will be completely invisible. If you start your selection at the top, this extra line will be obscured by the blinking caret.

I'm guessing that whoever tested this in the past used the mouse. Initially I was confused because it seemed to sometimes happen and sometimes not happen.

Does that make sense?

BUGS automation moved this from In Progress to Done Aug 9, 2018
@meaghanlewis meaghanlewis added this to the 2.5.5 milestone Aug 9, 2018
@meaghanlewis meaghanlewis removed this from Done in BUGS Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.