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

Mouse selection doesn't work like other apps when mouse cursor is to the left of the text area, to select whole line(s) #7486

Closed
zpostfacto opened this issue Aug 31, 2020 · 2 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@zpostfacto
Copy link

zpostfacto commented Aug 31, 2020

I absolutely love love this product, thank you so much guys for making it.

This may be a duplicate of #5099 (I'm not sure), but I wanted to call out one specific behaviour that I find to be especially clearly wrong based on muscle memory from other apps, and also irritating to work around.

Environment

Windows Terminal 1.2.2381.0, installed from the app store, on Windows 10.

Steps to reproduce

OK, I want to select one or more whole lines, including their newline. In almost every other app I have ever used, if you start dragging and then drag while the mouse cursor is to the left of the text area (perhaps even outside the window, which is fine, since the mouse is captured), then the first character on the line will not be included in the selection, since you are to the left of it. In Windows Terminal, it is included, and this seems wrong. It's especially irritating because basically there's no way to get your selection to include that last newline and thus select whole blocks of text with the mouse.

So, steps to reproduce are:

  • Click somewhere and start selecting multiple lines.
  • While dragging, move the mouse far to the left of the first column of text, such as into the margin, or up against the left edge of the monitor.

Expected behavior

I expect the selection to end with a newline character from the last selected line.

Actual behavior

Instead, the first character of the line below is included, like this:

image

(My mouse cursor isn't int he screen cap, but it's to the left of the current window.)

Also, if somebody can point me in the right direction, I could probably fix this and submit a PR. Just need a pointer to where to start poking around.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 31, 2020
@DHowett
Copy link
Member

DHowett commented Sep 2, 2020

Hey, thanks for the report! You're right about this being a /duplicate of #5099 -- making the selection inclusive on the left and exclusive on the right will resolve this pretty handily (because you'd need to move into the right half of the first cell to select the cell).

There's a branch, if you want to look at some of its historical diffs, where I poked at this for a little bit. It's not pleasant, because changing up our coordinate system never is. https://github.com/microsoft/terminal/tree/dev/duhowett/hax-selection-exclusive

@ghost
Copy link

ghost commented Sep 2, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Sep 2, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Sep 2, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants