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

Limit triple-click selection to command field only #9881

Open
SpitFire-666 opened this issue Apr 18, 2021 · 4 comments
Open

Limit triple-click selection to command field only #9881

SpitFire-666 opened this issue Apr 18, 2021 · 4 comments
Labels
Area-Input Related to input processing (key presses, mouse, etc.) 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.
Milestone

Comments

@SpitFire-666
Copy link

Description of the new feature/enhancement

Currently, Ctrl+A will select the entire command/text input, however, triple clicking (mouse version of Select All selects the entire line (including the prompt). GIF shows selecting with mouse vs with keyboard:

terminal

I can't think of many (any?) situations where I'd want to include the prompt when selecting or copying a line.

Proposed technical implementation details (optional)

I would like the triple click action to align to the Ctrl+A selection method. Thanks!

@SpitFire-666 SpitFire-666 added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Apr 18, 2021
@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 Apr 18, 2021
@LuanVSO
Copy link
Contributor

LuanVSO commented Apr 18, 2021

the ctrl+a selection is handled by PowerShell while the triple click is handed by terminal.
there's no way for terminal to have the same behavior because it doesn't know where the prompt is or even if there is a prompt in the screen

@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Apr 19, 2021

Shells could be configured to emit FTCS_COMMAND_START from Proprietary Escape Codes of iTerm2, and Windows Terminal could then use that to avoid selecting the prompt. The same marking of prompts would be used in #6232.

I think cmd.exe and PowerShell already let users embed ESC characters in prompts, so these shells would not have to be changed. Not so sure about Windows PowerShell though.

@zadjii-msft
Copy link
Member

Huh. Okay, the FTCS_COMMAND_START solution is clever. This would then also require #1553, and some way of setting triple click to "select the whole line up to the prompt (if one exists)". So I guess I'll toss this in on #1553

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) 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 Apr 19, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 19, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Apr 19, 2021
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 29, 2021
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@zadjii-msft
Copy link
Member

I am TEMPTED to axe this, in favor of the experimental.rightClickContextMenu (#3337, #14775) and shell integration + the "select command" entries added in #15020.

That's not triple click, it's rightclick, move, left click, but still

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) 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.
Projects
None yet
Development

No branches or pull requests

4 participants