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

Add findNext, findPrev actions #8917

Merged
14 commits merged into from
Feb 18, 2021
Merged

Add findNext, findPrev actions #8917

14 commits merged into from
Feb 18, 2021

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Jan 27, 2021

This PR is a resurrection of #8522. @Hegunumo has apparently deleted
their account, but the contribution was still valuable. I'm just here to
get it across the finish line.

This PR adds new action for navigating to the next & previous search
results. These actions are unbound by default. These actions can be used
from directly within the search dialog also, to immediately navigate the
results.

Furthermore, if you have a search started, and close the search box,
then press this keybinding, it will still perform the search. So you
can just hit F3 repeatedly with the dialog closed to keep
searching new results. Neat!

If you dispatch the action on the key down, then dismiss a selection on
a key up, we'll end up immediately destroying the selection when you
release the bound key. That's annoying. It also bothers @carlos-zamora
in #3758. However, I think we can just only dismiss the selection on a
key up. I think that's fine. It seems fine so far. We've got an
entire release cycle to futz with it.

Validation Steps Performed

I've played with it all day and it seems crisp.

Closes #7695

Co-authored-by: Kiminori Kaburagi yukawa_hidenori@icloud.com

@ghost ghost added Area-Settings Issues related to settings and customizability, for console or terminal Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Jan 27, 2021
Copy link
Member

@carlos-zamora carlos-zamora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want a little bit of discussion on the keybinding arg thing before approving. The code is solid. Don't feel strongly enough on these topics to block though.

src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalControl/TermControl.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalControl/TermControl.cpp Outdated Show resolved Hide resolved
src/cascadia/TerminalControl/TermControl.cpp Outdated Show resolved Hide resolved
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Feb 4, 2021
@ghost ghost requested review from miniksa, leonMSFT and PankajBhojwani February 4, 2021 10:30
@carlos-zamora
Copy link
Member

Don't forget to update the docs plz

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I only have one concern. This is great otherwise.

@@ -102,6 +102,8 @@ namespace Microsoft.Terminal.TerminalControl

void CreateSearchBoxControl();

void SearchMatch(Boolean goForward);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a weird public API, but i suppose that this is fine

src/cascadia/TerminalControl/TermControl.cpp Outdated Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 5, 2021
@zadjii-msft zadjii-msft self-assigned this Feb 8, 2021
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 8, 2021
@zadjii-msft zadjii-msft assigned DHowett and unassigned zadjii-msft Feb 11, 2021
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 18, 2021
@ghost
Copy link

ghost commented Feb 18, 2021

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 491cb21 into main Feb 18, 2021
@ghost ghost deleted the dev/migrie/f/finish-search-actions branch February 18, 2021 19:21
@ghost
Copy link

ghost commented Mar 1, 2021

🎉Windows Terminal Preview v1.7.572.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Area-User Interface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Second It's a PR that needs another sign-off Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add "next search match" and "prev search match" bind-able key for find operations
6 participants