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

[BUG] Incorrect highlight of search result when viewing file history #757

Open
wenfangdu opened this issue Jan 19, 2024 · 0 comments
Open

Comments

@wenfangdu
Copy link

Describe the Bug

image

Faulty code:

let fileName = this.props.committedFile.relativePath;
if (fileName.lastIndexOf('/') != -1) {
fileName = fileName.substr(fileName.lastIndexOf('/') + 1);
}
const fileNameClass = fileName == globalThis.fileName ? 'file-name-active' : 'file-name';

Steps To Reproduce

File structure:
-src/index.tsx
-eva/index.tsx

  1. Make changes to the above files and commit them
  2. Open src/index.tsx
  3. Use git.viewFileHistory
  4. Select the commit just made and search for "index"
  5. Both src/index.tsx and eva/index.tsx are highlighted

Expected Behavior

Only src/index.tsx should be highlighted.

Environment

  • OS: macOS 14
  • VSCode version: 1.85.1
  • Git History version: 0.6.20
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

No branches or pull requests

1 participant