You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Do a Find in Files on a string that appears several times in one file
Click the 2nd result
Go to the top of the file and type in another match by hand (or copy/paste, or duplicate the line the 1st result is on, etc. -- anything that creates a new match earlier in the file)
Result: The 'selected match' highlight is now on (what used to be) the 1st result.
Expected: Highlight remains on the match you last clicked, (what used to be) the 2nd result.
If you delete an existing result instead in step 3, the highlight will be wrong in the opposite direction instead.
This is happening because the code that re-renders the results list after an edit just restores the selection highlight by table-row index.
Since this isn't a very important selection -- it's really just a marker for 'last clicked match' -- I suggest we just clear it whenever the number of matches has changed, rather than trying to do something fancy to restore it more correctly.
Note: This occurs on master, so it is not a result of the Replace In Files code changes.
Result: The 'selected match' highlight is now on (what used to be) the 1st result.
Expected: Highlight remains on the match you last clicked, (what used to be) the 2nd result.
If you delete an existing result instead in step 3, the highlight will be wrong in the opposite direction instead.
This is happening because the code that re-renders the results list after an edit just restores the selection highlight by table-row index.
Since this isn't a very important selection -- it's really just a marker for 'last clicked match' -- I suggest we just clear it whenever the number of matches has changed, rather than trying to do something fancy to restore it more correctly.
Note: This occurs on master, so it is not a result of the Replace In Files code changes.