Skip to content

This fixes #78170#78327

Merged
Tyriar merged 6 commits intomicrosoft:masterfrom
ATheCoder:master
Aug 6, 2019
Merged

This fixes #78170#78327
Tyriar merged 6 commits intomicrosoft:masterfrom
ATheCoder:master

Conversation

@ATheCoder
Copy link
Contributor

@ATheCoder ATheCoder commented Aug 1, 2019

@Tyriar Tyriar added this to the August 2019 milestone Aug 2, 2019
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

This doesn't quite align with the editor find as it should only trigger a new search if the current selection is no longer valid. For example, search "foo" and get a match that's wrapped in spaces, if you toggle match whole word then in the editor it won't change anything but with this PR in the terminal it will move the selection

@ATheCoder
Copy link
Contributor Author

In the editor find, it will always move to the first match. If you select the second match and toggle any of the buttons, it will move to the first one.

@msftclas
Copy link

msftclas commented Aug 4, 2019

CLA assistant check
All CLA requirements met.

@ATheCoder
Copy link
Contributor Author

ATheCoder commented Aug 4, 2019

@Tyriar I believe right now it should work the same way as the editor find works.

Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Thanks!

const instance = this._terminalService.getActiveInstance();
if (instance) {
if (instance.hasSelection()) {
instance.clearSelection();
Copy link
Member

Choose a reason for hiding this comment

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

Huh, I thought the editor's find was more clever about this and wouldn't re-search from the beginning but apparently that's exactly how it works 👍

@Tyriar Tyriar merged commit 3a8275a into microsoft:master Aug 6, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants