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

Suggestion: Allow line selection in terminal #46761

Closed
chrisdias opened this issue Mar 27, 2018 · 10 comments
Closed

Suggestion: Allow line selection in terminal #46761

chrisdias opened this issue Mar 27, 2018 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@chrisdias
Copy link
Member

chrisdias commented Mar 27, 2018

testing #46594

Suggestion: Allow selecting a line at a time while navigating in terminal line by line.

With #46594 I can use CMD+UpArrow CMD+DownArrow to navigate, and can press Shift+CMD+UpArrow and Shift+CMD+DownArrow to select a block of text in the terminal (between commands). This is cool for selecting blocks of text that are the output of a command.

But, what if I want to select a single line at a time? Since I can use CMD+ALT+PageUp and CMD+ALT+PageDown to navigate line by line in the terminal, perhaps Shift+CMD+ALT+PageUp and Shift+CMD+ALT+PageDown could be used for that.

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Mar 27, 2018
@Tyriar Tyriar added feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities labels Mar 28, 2018
@Tyriar
Copy link
Member

Tyriar commented Mar 28, 2018

Opening to PRs, this will involve adding 2 new commands terminal.integrated.selectToNextLine/selectToPreviousLine and handling it within TerminalCommandTracker.

@Tyriar Tyriar added this to the Backlog milestone Mar 28, 2018
@ddruker
Copy link
Contributor

ddruker commented Apr 7, 2018

@Tyriar Mind if I tackle this? I was just in the integrated terminal code so this code be a good issue for me.

@Tyriar
Copy link
Member

Tyriar commented Apr 8, 2018

@ddruker sure! This will probably involve having some additional state in TerminalCommandTracker to tell whether it's a command or a line focused.

https://github.com/Microsoft/vscode/blob/3fbfccad359e278a4fbde106328b2b8e2e2242a7/src/vs/workbench/parts/terminal/node/terminalCommandTracker.ts#L25-L26

We probably want to create a new marker whenever the line is changed (if the previous line is not a command), if we just track it with a number it might be invalid when lines are trimmed off the top of the terminal.

@ddruker
Copy link
Contributor

ddruker commented Apr 8, 2018

@Tyriar I'm assuming this would only be previous line selection and only one line can be selected at a time using the proposed commands. Does that sound right?

Also, would the UX be similar to line by line navigation, where the terminal window always scrolls? For example, the terminal window does not need to scroll unless the line is out of view.

@Tyriar
Copy link
Member

Tyriar commented Apr 9, 2018

I'm assuming this would only be previous line selection and only one line can be selected at a time using the proposed commands. Does that sound right?

Next should be added as well to mirror the existing commands. Users could for example go one line too far and want to go back.

Also, would the UX be similar to line by line navigation, where the terminal window always scrolls? For example, the terminal window does not need to scroll unless the line is out of view.

@ddruker for the selectTo* commands, the 'focused' line is always in the middle of the viewport.

@ddruker
Copy link
Contributor

ddruker commented Apr 10, 2018 via email

@Tyriar
Copy link
Member

Tyriar commented May 19, 2018

Commands added in #47991

@Tyriar Tyriar closed this as completed May 19, 2018
@Tyriar Tyriar modified the milestones: Backlog, May 2018 May 19, 2018
@Tyriar Tyriar added the verification-needed Verification of issue is requested label May 19, 2018
@isidorn
Copy link
Contributor

isidorn commented May 29, 2018

Select to previous line works great.
However I was not able to get anything useful from the select to next line since I always have the last line focused in my terminal. Even if I select some text in the middle of the terminal select to next
line simply jumps back to last line. What am I missing here?

@Tyriar
Copy link
Member

Tyriar commented May 29, 2018

@isidorn select next command/line need to be used after select previous command/line.

@isidorn
Copy link
Contributor

isidorn commented May 29, 2018

@Tyriar ok, adding verified even though I find it a bit unintuitive.
I would expect that the select next line would work even if I have 3 lines manualy selected.

@isidorn isidorn added the verified Verification succeeded label May 29, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities terminal Integrated terminal issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants