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

Moving the cursor when scrolling in the history to select text #4985

Closed
fullenw1 opened this issue Mar 18, 2020 · 10 comments
Closed

Moving the cursor when scrolling in the history to select text #4985

fullenw1 opened this issue Mar 18, 2020 · 10 comments
Assignees
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@fullenw1
Copy link

Description of the new feature/enhancement

Currently we can scroll up and down in the history with the keyboard but the cursor remains at the bottom.
That's why, when we want to copy/paste something from the history we have to use the mouse.

The idea is that when we scroll up and down with the keyboard, the cursor is following.
Also once the cursor is inside the history, we can move right and left with the keyboard to select the text we need.

Proposed technical implementation details (optional)

@fullenw1 fullenw1 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Mar 18, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Mar 18, 2020
@zadjii-msft
Copy link
Member

@carlos-zamora this sounds like a good idea to include as part of the #715/#2840 spec. I'll leave it to you if you want to leave this open or merge it in with that one.

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Mar 18, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Mar 18, 2020
@zadjii-msft zadjii-msft added this to the Terminal v1.x milestone Mar 18, 2020
@fullenw1
Copy link
Author

@zadjii-msft
Oh yes! I've searched before opening this issue but probably not with the right keywords...
You can merge to either of them. I never merged an issue, but I think I don't have permissions to do that. Can you do it for me please? Or just guide me :)

@zadjii-msft
Copy link
Member

Oh I mostly meant that @carlos-zamora should be the one to merge it. He might want to leave this open as a child task on that issue - sometimes we'll do that for larger features that comprise a bunch of smaller tasks. Since he owns this whole feature area, I'm leaving the decision up to him

@fullenw1
Copy link
Author

Ah ok :)
Sorry for the misunderstanding!

@carlos-zamora
Copy link
Member

I'll leave this open for now. I want to make sure I update the spec. Thanks!

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Mar 18, 2020
@DHowett-MSFT
Copy link
Contributor

@carlos-zamora I pulled triage off this; can you link it up to the main issue you're using to track these things, in Mike's checklist style?

@carlos-zamora
Copy link
Member

Ok, now that a good amount of mark mode and keyboard selection is done, we (will) have support for the following navigation schemes:

  • *arrow keys --> move by character
  • ctrl + arrow keys --> move by word
  • home/end --> move to start/end of line
  • *ctrl + home/end --> move to start/end of buffer
  • *pgup/pgdn --> scroll up/down by viewport size

If you hit a viewport boundary, we automatically scroll.

The ask here is that the scroll key bindings automatically move the cursor and force it to be within the viewport. But I think the starred (*) items above may be sufficient to address the issue. I also think there's still a use case for keyboard scrolling without moving the cursor.

So I'm going to close this out, but I'm open to discussing it more if I'm missing something.

Closed by #10824

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jun 28, 2022
@carlos-zamora carlos-zamora reopened this Jul 20, 2022
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jul 20, 2022
@carlos-zamora
Copy link
Member

From #13533...

The "mark" should follow the scroll buffer if the buffer is scrolled via other actions. Ideally, it should select when that happens with SHIFT pressed.

Design-wise, I'm thinking of it this way:

  • If no selection has been made, scrolling clamps the cursor to be within the visible area.
  • If a selection has been made, scrolling doesn't move the cursor.
    • Why not drag/clamp the active endpoint? Because there's still a benefit to scrolling without forcing the endpoint to move with you. That's how text editors generally work, so it's kinda the expected behavior here, right?

In order to accomplish that, I think we need to wait for #13516 because the "single cell selection" means that there's always a selection :/

@zadjii-msft zadjii-msft removed this from the 22H2 milestone Dec 2, 2022
@zadjii-msft zadjii-msft added this to the Backlog milestone Dec 2, 2022
@zadjii-msft
Copy link
Member

@carlos-zamora did we do this?

@carlos-zamora
Copy link
Member

Yeah, I'm gonna close this out. We're able to select text using the keyboard and move the viewport around.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

4 participants