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

Comments

Projects
None yet
3 participants
@jcansdale
Contributor

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 added the bug label Aug 8, 2018

@meaghanlewis meaghanlewis moved this from Low Priority to In Progress in BUGS Aug 8, 2018

@meaghanlewis

This comment has been minimized.

Show comment
Hide comment
@meaghanlewis

meaghanlewis Aug 8, 2018

Contributor

Good catch!

Contributor

meaghanlewis commented Aug 8, 2018

Good catch!

@meaghanlewis

This comment has been minimized.

Show comment
Hide comment
@meaghanlewis

meaghanlewis Aug 8, 2018

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@grokys

grokys Aug 9, 2018

Contributor

@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);
}

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jcansdale

jcansdale Aug 9, 2018

Contributor

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?

Contributor

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?

@jcansdale jcansdale closed this in #1844 Aug 9, 2018

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