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

Closed
opened 2026-01-31 03:00:35 +00:00 by claunia · 11 comments
Owner

Originally created by @DavidKarlas on GitHub (Dec 28, 2020).

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.

Originally created by @DavidKarlas on GitHub (Dec 28, 2020). # Environment ```none 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.
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2021):

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

@zadjii-msft commented on GitHub (Jan 3, 2021): @Don-Vito will this also conveniently be fixed by #8521?
Author
Owner

@Don-Vito commented on GitHub (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.

@Don-Vito commented on GitHub (Jan 3, 2021): @zadjii-msft - welcome back man! :blush: 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 :smile: 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.
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2021):

@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 commented on GitHub (Jan 3, 2021): @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.
Author
Owner

@Don-Vito commented on GitHub (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 https://github.com/microsoft/terminal/pull/8586).

@Don-Vito commented on GitHub (Jan 3, 2021): @zadjii-msft - wait... :smile: 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 https://github.com/microsoft/terminal/pull/8586).
Author
Owner

@DavidKarlas commented on GitHub (Jan 3, 2021):

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.

@DavidKarlas commented on GitHub (Jan 3, 2021): 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.
Author
Owner

@Don-Vito commented on GitHub (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: https://github.com/microsoft/terminal/pull/8586.

@Don-Vito commented on GitHub (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: https://github.com/microsoft/terminal/pull/8586.
Author
Owner

@zadjii-msft commented on GitHub (Jan 3, 2021):

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

/dup #6679

Thanks!

@zadjii-msft commented on GitHub (Jan 3, 2021): Ahhhhh okay yep, that makes sense. I'll close this one as a dupe, since they had the same root cause. /dup #6679 Thanks!
Author
Owner

@ghost commented on GitHub (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!

@ghost commented on GitHub (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!
Author
Owner

@DavidKarlas commented on GitHub (Jan 3, 2021):

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?

@DavidKarlas commented on GitHub (Jan 3, 2021): 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?
Author
Owner

@Don-Vito commented on GitHub (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 😄

@Don-Vito commented on GitHub (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 :smile:
Author
Owner

@zadjii-msft commented on GitHub (Jan 4, 2021):

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.

@zadjii-msft commented on GitHub (Jan 4, 2021): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11903