[PR #8917] [MERGED] Add findNext, findPrev actions #27335

Open
opened 2026-01-31 09:21:24 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/8917
Author: @zadjii-msft
Created: 1/27/2021
Status: Merged
Merged: 2/18/2021
Merged by: @undefined

Base: mainHead: dev/migrie/f/finish-search-actions


📝 Commits (10+)

  • c083fb0 Hook up with TerminalPage
  • 694d07a code format
  • 32f54b1 Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions
  • 494aa4b Trying to revers engineer some of this weird logic. I think we can get away with only dismissing selection on key down. Otherwise keyups will dismiss the selection you just made
  • 0b9bfc8 I'm shocked that this works
  • 4ff17c5 cleanup for review
  • f609ab6 Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions
  • f0d2935 Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions
  • 01d7ef3 address carlos's suggestions
  • ba0c029 I'm a GENIUS

📊 Changes

18 files changed (+168 additions, -4 deletions)

View changed files

📝 doc/cascadia/profiles.schema.json (+26 -0)
📝 src/cascadia/TerminalApp/AppActionHandlers.cpp (+12 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.cpp (+5 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.h (+1 -0)
📝 src/cascadia/TerminalApp/ShortcutActionDispatch.idl (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.cpp (+1 -0)
📝 src/cascadia/TerminalApp/TerminalPage.h (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+24 -3)
📝 src/cascadia/TerminalControl/TermControl.h (+2 -1)
📝 src/cascadia/TerminalControl/TermControl.idl (+2 -0)
📝 src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp (+4 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.cpp (+13 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.h (+46 -0)
📝 src/cascadia/TerminalSettingsModel/ActionArgs.idl (+13 -0)
📝 src/cascadia/TerminalSettingsModel/KeyMapping.idl (+1 -0)
📝 src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw (+6 -0)
📝 src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h (+8 -0)
📝 src/cascadia/TerminalSettingsModel/defaults.json (+2 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/8917 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/27/2021 **Status:** ✅ Merged **Merged:** 2/18/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/f/finish-search-actions` --- ### 📝 Commits (10+) - [`c083fb0`](https://github.com/microsoft/terminal/commit/c083fb00c20e99f41da219ca9fc221c3647ab4c3) Hook up with TerminalPage - [`694d07a`](https://github.com/microsoft/terminal/commit/694d07a95196a90d13e745520ad67783835fa863) code format - [`32f54b1`](https://github.com/microsoft/terminal/commit/32f54b1d5d6e92d02379ca449c92a2440f0508ec) Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions - [`494aa4b`](https://github.com/microsoft/terminal/commit/494aa4ba50b23a414957726c4d92ee1ec6a89b20) Trying to revers engineer some of this weird logic. I think we can get away with only dismissing selection on key _down_. Otherwise keyups will dismiss the selection you just made - [`0b9bfc8`](https://github.com/microsoft/terminal/commit/0b9bfc86480a24f046b98b23939931e293d5b42e) I'm shocked that this works - [`4ff17c5`](https://github.com/microsoft/terminal/commit/4ff17c514e3683da4dd67460cebb6773b848ca19) cleanup for review - [`f609ab6`](https://github.com/microsoft/terminal/commit/f609ab69a43b548a44d89a4d89299baebe1186bb) Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions - [`f0d2935`](https://github.com/microsoft/terminal/commit/f0d29355a0b59885e7077bc8e201ab3cfd9ab879) Merge remote-tracking branch 'origin/main' into dev/migrie/f/finish-search-actions - [`01d7ef3`](https://github.com/microsoft/terminal/commit/01d7ef3b1464683b25dd83c0b83ad91e9fc58224) address carlos's suggestions - [`ba0c029`](https://github.com/microsoft/terminal/commit/ba0c029b8e4a985aba13490f41456b6a3c6e9d74) I'm a GENIUS ### 📊 Changes **18 files changed** (+168 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `doc/cascadia/profiles.schema.json` (+26 -0) 📝 `src/cascadia/TerminalApp/AppActionHandlers.cpp` (+12 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.cpp` (+5 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.h` (+1 -0) 📝 `src/cascadia/TerminalApp/ShortcutActionDispatch.idl` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.cpp` (+1 -0) 📝 `src/cascadia/TerminalApp/TerminalPage.h` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+24 -3) 📝 `src/cascadia/TerminalControl/TermControl.h` (+2 -1) 📝 `src/cascadia/TerminalControl/TermControl.idl` (+2 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp` (+4 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.cpp` (+13 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.h` (+46 -0) 📝 `src/cascadia/TerminalSettingsModel/ActionArgs.idl` (+13 -0) 📝 `src/cascadia/TerminalSettingsModel/KeyMapping.idl` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/Resources/en-US/Resources.resw` (+6 -0) 📝 `src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h` (+8 -0) 📝 `src/cascadia/TerminalSettingsModel/defaults.json` (+2 -0) </details> ### 📄 Description 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 <kbd>F3</kbd> 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> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:21:24 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27335