Selected text should populate search box #11470

Closed
opened 2026-01-31 02:48:33 +00:00 by claunia · 5 comments
Owner

Originally created by @carlos-zamora on GitHub (Nov 17, 2020).

Description of the new feature/enhancement

If there is an active selection in the terminal, opening the search box should be populated with the selected text.

Originally created by @carlos-zamora on GitHub (Nov 17, 2020). # Description of the new feature/enhancement If there is an active selection in the terminal, opening the search box should be populated with the selected text.
Author
Owner

@DHowett commented on GitHub (Nov 17, 2020):

What if there's already a needle in the search box?

@DHowett commented on GitHub (Nov 17, 2020): What if there's already a needle in the search box?
Author
Owner

@zadjii-msft commented on GitHub (Nov 17, 2020):

I vote replace it with the new selection.

@zadjii-msft commented on GitHub (Nov 17, 2020): I vote replace it with the new selection.
Author
Owner

@Don-Vito commented on GitHub (Dec 6, 2020):

This one is quite straightforward, but I am not sure what to do with multi-line selection.

Options are:

  1. Do not populate the search if multiple lines are selected (this is what VSCode does)
  2. Populate only with the first line
  3. Populate with the trimmed selection returned by RetrieveSelectedTextFromBuffer(true) (this is what notepad++ does)

I personally played with the 3rd option and liked it more.
WDYT?

@Don-Vito commented on GitHub (Dec 6, 2020): This one is quite straightforward, but I am not sure what to do with multi-line selection. Options are: 1. Do not populate the search if multiple lines are selected (this is what VSCode does) 2. Populate only with the first line 3. Populate with the trimmed selection returned by `RetrieveSelectedTextFromBuffer(true)` (this is what notepad++ does) I personally played with the 3rd option and liked it more. WDYT?
Author
Owner

@Don-Vito commented on GitHub (Dec 6, 2020):

The funny stuff that multi-line selection works.. but I am not sure I can assume it works in all scenarios.
SelectText

However after some thoughts.. I suggest to start with what VS Code do.. populate only if single line selected.

@Don-Vito commented on GitHub (Dec 6, 2020): The funny stuff that multi-line selection works.. but I am not sure I can assume it works in all scenarios. ![SelectText](https://user-images.githubusercontent.com/4639110/101292873-d3e16000-381a-11eb-8264-7aee193268d5.gif) However after some thoughts.. I suggest to start with what VS Code do.. populate only if single line selected.
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8521, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8521, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11470