Terminal: Feature Request: Double Click Selection

Created on 24 May 2019  Â·  6Comments  Â·  Source: microsoft/terminal

Summary of the new feature/enhancement

Double-clicking the text buffer creates a selection encompassing the "word".
The delimiters for what makes a "word" are defined in the settings (described below).

Dragging after a double click maintains the "beginning of the word" anchor but changes the other one.

Settings

| Property Name | Type | Description | Default Value |
| --------------- | ------- | ----------- | -------------- |
| "selectionDelimiters" | array | list of characters used as delimiters | [' ', '/', '\'] |

Use case: easily select a path or word from the selection.

Proposed technical implementation details (optional)

If possible, have XAML identify double-click. Everything else should be pretty straightforward. The TermControl will work with the Terminal to create the selection. When the event is triggered, we need to check the delimiters from the settings to decide what to select.

Area-Interaction Area-TerminalControl In-PR Issue-Feature Needs-Tag-Fix Product-Terminal Work-Item

All 6 comments

Would this support double clicking to select an entire word? Or just double click to switch to mouse selection mode?

Would this support double clicking to select an entire word? Or just double click to switch to mouse selection mode?

Assuming the window is focused and you're already in mouse selection mode, it should select the entire word (inclusive).

Double click and drag is also important— like current PowerShell, it should be possible to select a line or word and then drag out to encompass more text.

Wow, great job everyone! Could you let me know how I can find out when this change will actually be rolled out?

Since it’s merged to master, you can try it out by building the repo on GitHub today.

For the store update, it’ll be in the next release that’s being tracked with the 0.3 milestone.

Double click does not work when double-clicking on the first character of a line
(tested in Version 0.3)

Was this page helpful?
0 / 5 - 0 ratings