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

Can't click select URL #14374

Closed
danmoseley opened this issue Nov 12, 2022 · 13 comments
Closed

Can't click select URL #14374

danmoseley opened this issue Nov 12, 2022 · 13 comments
Labels
Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@danmoseley
Copy link
Member

danmoseley commented Nov 12, 2022

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22621.819

Other Software

No response

Steps to reproduce

Display a URL, eg., do echo https://foo.visualstudio.com/bar/_git/baz
(in reality I did git remote -v)

Repeatedly click on the URL to select it so you can copy it.

Expected Behavior

Double click selects the URL, then you can hit enter to copy it. I do this often in the legacy cmd terminal.

Actual Behavior

Double click selects one fragment of the URL (between periods). Triple click selects the whole line.

Workaround is drag select

@danmoseley danmoseley added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 12, 2022
@j4james
Copy link
Collaborator

j4james commented Nov 12, 2022

@danmoseley You should be able to configure this the way you like by changing the word delimiters. That's what determines the range of characters selected with a double-click. To get urls to select, you'll probably want to remove things like :, ., /, ?, &, = - or possibly just have space as a delimiter? Whatever works best for you.

See also #3196.

@zadjii-msft zadjii-msft added Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered and removed Issue-Bug It either shouldn't be doing this or needs an investigation. labels Nov 12, 2022
@danmoseley
Copy link
Member Author

danmoseley commented Nov 14, 2022

Thanks. that would help, but tbh I just expect it to work out of the box the same as the legacy terminal. I don't have any interest in setting up new options to solve this just for myself. Perhaps there could be a "legacy terminal mode" that could also translate other settings over.

What delimiters does the legacy cmd.exe effectively use? I'm also curious what Linux does.

@237dmitry
Copy link

237dmitry commented Nov 14, 2022

I'm also curious what Linux does.

The url string is selected by double-clicking. Tilix, xfce4-terminal.

@DHowett
Copy link
Member

DHowett commented Nov 14, 2022

What delimiters does the legacy cmd.exe effectively use?

conhost only[1] uses space; this applies to powershell and cmd.

This is indicative of one of the biggest issues we're facing as a team: we can't modernize and improve the defaults without breaking folks' muscle memory or asking them to change settings.

We've toyed with the idea of having a big escape button that would make Terminal act like conhost, but that's only delaying the inevitable and the inexorable forward march of progress.

Admittedly, there's still a lot we can do to close the gap.

[1] It's funny. In Windows 2000, we added support for configurable delimiters and set the defaults to include a bunch of characters that are default in Terminal today. A bug prevented that setting from ever getting read. :P

@DHowett
Copy link
Member

DHowett commented Nov 14, 2022

I'm also curious what Linux does.

There's a very rich ecosystem of Terminal emulators on Linux. Off the top of my dev box:

Test URL: https://aka.ms/PowerShell-Release?tag=v7.3.0

  • Konsole: selects the entire URL
  • gnome-terminal: selects //hostname/path but not the scheme
  • xterm: selects only one word in the URL
  • rxvt: selects the entire URL
  • foot: selects //hostname/path only
  • lxterminal: selects everything up to but not including the =

The variety here is staggering! 😄

@j4james
Copy link
Collaborator

j4james commented Nov 14, 2022

The variety here is staggering! 😄

Yeah, I was just experimenting with a few terminals I have on my test VM. This is what I established after a lot of double-clicking (might be a couple of errors, but you get the idea).

Xterm		"$'()*;<>[\]^`{|}
Gnome Terminal	!"$'()*:;<>[]^`{|}
Konsole		!"$'()*,;<>[\]^`{|}
Rxvt		&();<>|
Alacritty	"'(),:<>[]`{|}
Kitty		!"$'()*,:;<>[\]^`{|}

They do seem fairly consistent about avoiding the *nix path separator though, so that's perhaps something worth noting. Obviously they're less likely to care about the Windows path separator.

For the record, I couldn't care less.

@danmoseley
Copy link
Member Author

We've toyed with the idea of having a big escape button that would make Terminal act like conhost, but that's only delaying the inevitable and the inexorable forward march of progress.

how so? if you make it configurable, you’re simply offering a shortcut to set the configurations appropriately for someone who comes from conhost and would like a similar experience. I’m not looking for bug for bug compatibility (I agree that would a be a dead end), but make it easy for me to come over without manually hunting for and experimenting with various settings. I’ve changed the legacy settings 10 times in 25 years, I think it’s great so many settings are there but I don’t want to use them 🙂

@lhecker
Copy link
Member

lhecker commented Nov 15, 2022

I'm sorry for the entirely unrelated comment, but I think I just now realized how "crazy" those ASCII word delimiters are in an international setting. For instance this:

ねこはかわいい。

It consists of 3 words and a delimiter (ねこ , は , かわいい , 。) and your browser probably handles this correctly, whereas terminals are perpetually stuck in the "What do you mean there are people who don't speak English?". conhost's whitespace-only splitting doesn't feel any better in that regard. I feel like terminals are in a dire need of some UAX #29, Section 4.

@zadjii-msft
Copy link
Member

Overall, I'm gonna merge this in with /dup #3077 (or /dup #3196). I've also filed MicrosoftDocs/terminal#613, to add some additional documentation to try and clear this all up.

@ghost
Copy link

ghost commented Nov 15, 2022

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Nov 15, 2022
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 15, 2022
@danmoseley
Copy link
Member Author

danmoseley commented Nov 15, 2022

@zadjii-msft I wanted to make sure my meta-comment above wasn't lost. I can see Terminal has lots of settings -- lots of them an a json file to store them in. So it's natural that a possible response to this bug is -- we can add more settings!

But right now you have many customers who don't use the modern terminal, like me. I imagine you want to bring as many as you can over to the new terminal as smoothly as possible so you don't support both for decades more. My hypothesis is that many or most of those stick in the mud people are like me -- they don't want to go into settings, especially to look through many many settings. They just want to keep working much as they did before. I'm not suggesting reproducing bugs or engineering dead ends. But do we have anything tracking a legacy mode that defaults the existing settings (settings available for any of the terminal flavors) to make it more like the legacy one? In this specific case, it might be making the selection breaker character a space. Another example that I shared elsewhere was automatically bringing over my font style and size. Right now I have to do some arcane math or experimentation to find out how to express the font size I'm used to in terms of the new terminal, again digging through my settings. Can't a compatibility mode just do this math for me? Same for size and background color.

After you've made it easy for us folks to come over, in time we'll be experimenting with the extra cool settings and keypresses.

cc @shanselman

@danmoseley
Copy link
Member Author

@zadjii-msft is this worth opening an issue for as a suggestion?

@zadjii-msft
Copy link
Member

Sorry, I put this on my whiteboard todo list, but never ended up filing a thread for it 😅

IMO, the best option here is to file this as a docs task, for a page with a "Make the Terminal feel like the console" page. Throw in all the settings tweaks that are needed to make the Terminal act like conhost.

Making it a first-class button, toggle, whatever means we'd have to maintain it forever, and figure out all sorts of edge cases. Does "legacy mode" change the appearance of all the profiles? Or just the defaults? How far does it go in terms of bringing you back to vintage conhost?

If we instead make it a doc, then users can pick and choose how much of conhost they want. Not only that, but it'll provide an opportunity to help educate new users (who are less familiar with the new settings) on just how many new toggles there are.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Question For questions or discussion Resolution-Answered Related to questions that have been answered Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

6 participants