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

The incorrect line number always be given for the search result in a folder on Visual Studio Code for Mac #139426

Closed
lingyphone opened this issue Dec 18, 2021 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@lingyphone
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
    Version: 1.63.1 (Universal)
    Commit: fe719cd
    Date: 2021-12-14T02:13:13.580Z (1 day ago)
    Electron: 13.5.2
    Chromium: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Darwin x64 20.6.0

  • OS Version: MacOS Big Sur 11.6.1 (20G224)

Steps to Reproduce:

image

@roblourens
Copy link
Member

Is it possible that the file has some line endings that are lone CR characters, not CRLF or LF? Can you share the file?

@roblourens roblourens added the info-needed Issue requires more information from poster label Dec 21, 2021
@lingyphone
Copy link
Author

lingyphone commented Jan 19, 2022

Actually the lines ending by CR-CR-LF caused the mistake for mismatched search and editor

In NotePad++ on windows
image

In TextMate++ on Mac
image

In VSCode on Mac
image

The actual lines as below


function FindProxyForURL(url, host) {
    /* Define Private IP ranges */
    var privateIP = /^(0|10|127|192\.168|172\.1[6789]|172\.2[0-9]|172\.3[01]|169\.254|192\.88\.99)\.[0-9.]+$/;
    
    /* Find current local IP */
    var resolved_ip = dnsResolve(host);
    
    /* Find forwarding IP */

@roblourens
Copy link
Member

Yes, bare CR characters like that cause issues.

#35797
#48063

@github-actions github-actions bot locked and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants
@roblourens @lingyphone and others