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

Number of matches in Find panel is wrong #6521

Closed
jitseniesen opened this issue Feb 26, 2018 · 4 comments
Closed

Number of matches in Find panel is wrong #6521

jitseniesen opened this issue Feb 26, 2018 · 4 comments

Comments

@jitseniesen
Copy link
Member

Problem Description

The number of matches displayed in the Find panel underneath the editor is sometimes wrong.

What steps will reproduce the problem?

  1. Create a new file
  2. Enter the text xdoc.doc in the file
  3. Press Ctrl+F
  4. Enter .doc in the search field

What is the expected output? What do you see instead?

To the right of the search field, the text 2 of 2 appears, indicating 2 matches. However, there is only one match. It is not possible to go to match "1 of 2" using the "Find previous" and "Find next" buttons.

It may be that the search field is considered as a regular expression when counting the matches but not when traversing the matches.

Package Versions

Spyder 4.0.0.dev0 (Commit: 5e38070), Python 3.6.4 64bits, Qt 5.6.2, PyQt5 5.6 on Linux

@ccordoba12
Copy link
Member

If you're using regular expressions (the default), then xdoc is a match for .doc.

Should we disable regexps by default?

@jitseniesen
Copy link
Member Author

I'm not sure whether regexp is turned on or off, it's not clear to me from the UI. But I expect the number of matches to be counted to be the same as the number of matches that you can go to with the "Find previous" and "Find next" buttons.

This may actually be a duplicate of #5680 and fixed by the proposed PR #6526 .

@csabella
Copy link
Contributor

csabella commented Feb 27, 2018

I tested with the patch and without it over 3.x and the patch shows the correct output for this.

@ccordoba12
Copy link
Member

Ok, great! Closing this one as a duplicate of #5680 then.

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

No branches or pull requests

4 participants