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 infinite search loop bug #1016

Merged
merged 3 commits into from
Mar 16, 2022
Merged

Fix infinite search loop bug #1016

merged 3 commits into from
Mar 16, 2022

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Mar 16, 2022

Summary:

This issue fixes a case where a search triggers an infinite loop. It is caused by the QTextEdit returning True that a search was made, but does not select a text result. This causes an infinite loop in the search result counter. The loop will now break in such a case, and a cap has also been set on the number of search results to 1000. More results will in any case make the GUI sluggish on slower systems.

Related Issue(s):

Resolves #1015

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Patch 1.6.1 milestone Mar 16, 2022
@vkbo vkbo merged commit 1c7708b into patch Mar 16, 2022
@vkbo vkbo deleted the infinite_search_loop branch March 16, 2022 21:34
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.

1 participant