-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: F3 failed to locate the correct set of matches if file was edite…
…d after doing a search (#1867) ### Problem description The bug can be reproduced as follows: 1) Using Ctrl-F do a search for a term that occurs several times in the file. and press F3 to visit them. 2) Go back to the fop of the file and insert 3 blank lines. 3) Pressing F3 once or many times will not find the term entered above. ### Implementation description The reason for this bug is that the positions of the matches are not being reset when changes can potentially move them. The fix consists on resetting the search locations when changing the contents of the file and redoing the search after the changes are made. The bug was specially problematic when doing replace because the replacement position would be identified as a match. This PR fixes replace as well. --------- Co-authored-by: Nik <[email protected]>
- Loading branch information
Showing
2 changed files
with
75 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters