Repository navigation
Closed
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Help WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.In-PRThis issue has a related PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.The new Windows Terminal.
Milestone
Description
Environment
Windows build number: 19041.1
Windows Terminal version (if applicable): 0.7.3451.0
Steps to reproduce
- You may need to configure
wordDelimitersto equal" \\()\"',;<>~!@#$^*|+[]{}~│" - Open Windows Terminal at default window width, using Ubuntu
- Run
echo 'really long string of text, really particularly long indeed, typing typing typing typing, also this url: https://example.com' - Double click on the URL
Expected behavior
The entirety of the URL should be selected.
Actual behavior
Depending on whether you double click on the URL before or after the line wrap, either just https://example or .com is selected.
Reacted by Philippe Blain, Matthew Arnison, jnm27, Detzler and Ahmad S. Salama
Metadata
Metadata
Assignees
Labels
Area-OutputRelated to output processing (inserting text into buffer, retrieving buffer text, etc.)Related to output processing (inserting text into buffer, retrieving buffer text, etc.)Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Help WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.In-PRThis issue has a related PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsDoesn't match tag requirementsProduct-TerminalThe new Windows Terminal.The new Windows Terminal.
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]Double clicking does not select text after line wrap[/-][+]When ConPTY+Terminal are enlightened about wrapping, make double-click at the edge select across the edge[/+]DHowett-MSFT commentedon Dec 19, 2019
This is a nontrivial amount of work because Terminal doesn't exactly know when a word was wrapped. I think we have another task, which would be a prerequisite of this, lying around to fix pty wrapping. Marked appropriately.
vadimkantorov commentedon Jul 27, 2020
This is especially nasty when some long file path is wrapped, and that's exactly when you want it be selected easily
[-]When ConPTY+Terminal are enlightened about wrapping, make double-click at the edge select across the edge[/-][+]Make double-click at the edge select across the edge[/+]zadjii-msft commentedon May 1, 2023
I'd start by looking at
TextBuffer::_GetWordEndForSelectionintextBuffer.cpp. That's the code that should ultimately handle double-click selection. Looks to me like thatwhileloop only iterates over a single row (theresult.x < bufferSize.RightInclusive()check). I bet there's a better way to not do that (but also not explode if the user double clicks a word that runs right up to the end of the row in the last row of a totally full buffer).Probably possible to write tests in
TextBufferTests.cpp, but shockingly, there aren't any selection tests in there..?jnm27 commentedon Jul 8, 2023
Detzler commentedon Oct 9, 2023
Wrap word-wise selection when the word is actually wrapped (#16441)