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

Fix Search Source File crashing when used with a complex filter #2213

Merged
merged 9 commits into from
Aug 21, 2024

Conversation

sebjulliand
Copy link
Collaborator

Changes

Fixes #2207

Searching for text in members of a source file would crash if run on a "complex" filter. By complex, I mean a filter whose member filtering term is either a Regex or not a single generic name (XXX*).

This PR fixes this issue, making sure the search runs fine in all cases.
It also fixes some minor issues:

  • The search progress message was still Listing members... even after the listing was done and grep was running
  • The position used when opening a search hit could be wrong if the line started with one or more whitespaces
  • The interval set for displaying different messages during the search was not cleared immediately when the search was over

How to test this PR

  1. Run a search on a simple filter
  2. Run a search on a complex filter

In both cases, the results must be as expected and only the members actually listed by the filter must be shown in the search result.

Checklist

  • have tested my change

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand sebjulliand added the bug A confirmed issue when something isn't working as intended label Aug 3, 2024
@sebjulliand sebjulliand self-assigned this Aug 3, 2024
@worksofliam
Copy link
Contributor

I will review over the next day or two. Is it worth creating or updating any test cases for this fix?

@sebjulliand sebjulliand changed the title Fix Search Source File crahsing when used with a complex filter Fix Search Source File crashing when used with a complex filter Aug 3, 2024
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

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

Left some comments. I personally need more context to understand the purpose of this additional property (sorry!)

src/api/IBMi.ts Outdated Show resolved Hide resolved
src/api/IBMi.ts Show resolved Hide resolved
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
@sebjulliand
Copy link
Collaborator Author

I will review over the next day or two. Is it worth creating or updating any test cases for this fix?

Here, have a few tests 😊

@worksofliam worksofliam merged commit 7ee8da2 into master Aug 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed issue when something isn't working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Searching a source filter fails when the filter contains two strings.
2 participants