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 search result count to SearchAddon #3716

Merged
merged 32 commits into from
Mar 31, 2022
Merged

Conversation

meganrogge
Copy link
Member

@meganrogge meganrogge commented Mar 28, 2022

fixes #1659

@meganrogge
Copy link
Member Author

We can either do it this way or could return the count from findNext/findPrevious instead of a boolean

@meganrogge meganrogge self-assigned this Mar 28, 2022
@meganrogge meganrogge added this to the 4.19.0 milestone Mar 28, 2022
@meganrogge meganrogge requested a review from Tyriar March 28, 2022 19:41
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.

Do we only know the total count if decorations are on? What would this return if it's off so only a single result is selected?

@meganrogge
Copy link
Member Author

meganrogge commented Mar 28, 2022

When decorations are on, all of that work has already been done, so it costs nothing extra to get this info.

Would have to find all when decorations are not on. Do we want to support that?

@meganrogge
Copy link
Member Author

meganrogge commented Mar 29, 2022

We discussed and agreed upon:

addons/xterm-addon-search/src/SearchAddon.ts Outdated Show resolved Hide resolved
addons/xterm-addon-search/src/SearchAddon.ts Outdated Show resolved Hide resolved
@meganrogge meganrogge requested a review from Tyriar March 30, 2022 01:59
@@ -87,6 +87,7 @@ export class SearchAddon implements ITerminalAddon {
}, 200);
}
});
this.onDidChangeResults((results) => console.log(results));
Copy link
Member

Choose a reason for hiding this comment

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

Missed this one

Copy link
Member Author

Choose a reason for hiding this comment

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

think that was outdated as I don't see it there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search addon: Return the number of results of a search
2 participants