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

Find command doesn't reset search text if Find box is open #8671

Closed
DavidKarlas opened this issue Dec 28, 2020 · 11 comments
Closed

Find command doesn't reset search text if Find box is open #8671

DavidKarlas opened this issue Dec 28, 2020 · 11 comments
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@DavidKarlas
Copy link
Member

Environment

Windows build number: 10.0.19042.0
Windows Terminal version (if applicable): 1.4.3243.0

Steps to reproduce

Execute "find" command, default keybinding is "ctrl+shift+f".
Type "hello".
Execute "find" command again, default keybinding is "ctrl+shift+f".
Type "world".

Expected behavior

Find box opened with text "world" in it.

Actual behavior

Find box opened with text "helloworld" in it.

Why do I think this bug? Because this is behavior of most applications. e.g: Edge, Visual Studio, Visual Studio Code...

I think easiest and most correct fix would be to "select all" text when Find command in executed and FindBox is already opened.

@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 Dec 28, 2020
@zadjii-msft
Copy link
Member

@Don-Vito will this also conveniently be fixed by #8521?

@Don-Vito
Copy link
Contributor

Don-Vito commented Jan 3, 2021

@zadjii-msft - welcome back man! 😊
Nope - it won't be fixed by this PR. I believe there is no flow today that cleanups the needle. We only override it if something was selected, we do not override with empty string.
I've seen this as a kind of a feature 😄 I can absolutely fix it.
Pay attention that if hello was found in the text it will be selected and thus populated in any case.

@zadjii-msft
Copy link
Member

@Don-Vito Thanks!

I'm mostly thinking about the

"select all" text when Find command in executed and FindBox is already opened.

solution. That's probably what we'd want to do here.

@zadjii-msft zadjii-msft added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jan 3, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jan 3, 2021
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Jan 3, 2021
@Don-Vito
Copy link
Contributor

Don-Vito commented Jan 3, 2021

@zadjii-msft - wait... 😄 probably I don't know what select all means.. because as of 1.4 (or even earlier) we do select all the text in the searchbox when invoking the find command.

I think that the main problem in this ticket is that we didn't receive commands when search box is in focus (resolved by #8586).

@DavidKarlas
Copy link
Member Author

Looks like if I click with mouse on terminal to move focus out of FindBox, and press FindCommand keys it focused FindBox again and selects all text, but if I never leave FindBox and press FindCommand keys again nothing happens.

@Don-Vito
Copy link
Contributor

Don-Vito commented Jan 3, 2021

@DavidKarlas - thanks! It makes sense. We had a defect that when you are focusing on the FindBox the shortcuts are not executed. So when you press FindCommand keys or shortcut of every other command nothing happens (when focused on the FindBox try to click ctrl-shift-p to see that the command palette is not open as well). We fixed it here: #8586.

@zadjii-msft
Copy link
Member

Ahhhhh okay yep, that makes sense. I'll close this one as a dupe, since they had the same root cause.

/dup #6679

Thanks!

@ghost
Copy link

ghost commented Jan 3, 2021

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!

@zadjii-msft zadjii-msft removed this from the Terminal Backlog milestone Jan 3, 2021
@ghost ghost closed this as completed Jan 3, 2021
@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 Jan 3, 2021
@DavidKarlas
Copy link
Member Author

Yep its seems to be same issue, Ctrl+Shift+P also doesn't have effect... Is there any preview/internals channel that has this fix?

@Don-Vito
Copy link
Contributor

Don-Vito commented Jan 3, 2021

@DavidKarlas - not that I am aware of (beyond building from source code)..
Probably @zadjii-msft can help - I would also love to learn what and when gets released 😄

@zadjii-msft
Copy link
Member

We don't really have a more specific timeline to share for 1.6 other than "later in January" - there's a longer release cycle here because of the long holidays. Otherwise it's usually about once a month.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. 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

3 participants