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

Find and replace does not replace correctly when replacing many occurrences #32137

Closed
TomGroeneboer opened this issue Aug 8, 2017 · 7 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues

Comments

@TomGroeneboer
Copy link

When trying to find & replace many occurrences at once, the value that is put in does not seem right.

E.g. if I try to replace 'Code.Abstractions' with 'MoreCode.Abstractions' at 500 occurrences in 100 files (or 4000 occurrences in 1200 files, does not matter), some occurrences (maybe 30-50) end up with 'CCode.Abstractions' or 'CodeAbstractions'. This seems to happen every time I try to mass replace a value.

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:34:09.706Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
vscode-eslint dba 1.2.11
azure-functions-tools joh 0.3.0
csharp ms- 1.11.0
vscode-docker Pet 0.0.16

Steps to Reproduce:

  1. Open a large .NET solution
  2. Replace a namespace occurrence that is used a lot with something else (try to hit 1000+ occurrences)

Reproduces without extensions: Yes

If you need any further information, please let me know!

@vscodebot vscodebot bot added editor editor-find Editor find operations labels Aug 8, 2017
@rebornix
Copy link
Member

Considering it's multi file, pass to @roblourens

@rebornix rebornix assigned roblourens and unassigned rebornix Aug 15, 2017
@rebornix rebornix added search Search widget and operation issues and removed editor editor-find Editor find operations labels Aug 15, 2017
@roblourens
Copy link
Member

Does it only happen in certain files, or randomly? Is there something different about the places where it happens - very long lines, non-utf8 encoding?

@TomGroeneboer
Copy link
Author

It seems to happen randomly, we were trying to replace using statements in C# files created by the full blown Visual Studio. I guess these lines were around 50 characters each.

@TomGroeneboer
Copy link
Author

Any updates on this?

@roblourens
Copy link
Member

roblourens commented Aug 25, 2017

I haven't been able to repro it. Will have to investigate some more. Have you tried with 1.15?

@MynockSpit
Copy link

Might be different, but seems related. Check and see if the instances that failed to update correctly happened more than once on the same line.

weirdmultilinebehavior

@roblourens
Copy link
Member

No, that's not related.

@TomGroeneboer Based on your description I think it's actually #35633 - affecting files encoded with a UTF8 BOM, and matches on the first line. That's now fixed in insiders.

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 14, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

4 participants