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] Replace-all error in multiple files with regex #988

Open
5 tasks done
Tamaranch opened this issue Apr 24, 2024 · 1 comment
Open
5 tasks done
Labels
bug Something isn't working

Comments

@Tamaranch
Copy link

Tamaranch commented Apr 24, 2024

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

When I tried to massively replace #include <header> with #include "header" for local headers, I found that an error had crept into an otherwise correct set of replacements (worrying).

Pulsar version

1.116.0

Which OS does this happen on?

🐧 Arch based (Manjaro, Garuda, etc.)

OS details

Arch Linux

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

I don't know if it's possible to isolate the problem any further, in any case it's not reproducible without replacing in several files at once.

  1. Clone https://gitlab.xfce.org/apps/mousepad.git and checkout 0f7f29de820066c99ca12ec64c07f2da5cd7769e
  2. Open the project in pulsar
  3. Replace-all in multiple files with regex enabled and:
    Search-field: #include <(mousepad/.*)>
    Replace-field: #include "$1"
    Filter-field: *.c

You end up with

#include <mousepad/mousepad-private.h>
#include <mousepad/mousepad-application.h>

replaced with

#include "mousepad/mousepad-private.h"
#include "mousepad/mousepad-private.h"

in mousepad/main.c, while the other replacements are correct (although I haven't checked them all one by one).

Additional Information:

No response

@Tamaranch Tamaranch added the bug Something isn't working label Apr 24, 2024
@Tamaranch
Copy link
Author

Hm, could be similar to #942.

@Tamaranch Tamaranch changed the title Replace-all error in multiple files Replace-all error in multiple files with regex Apr 24, 2024
@Tamaranch Tamaranch changed the title Replace-all error in multiple files with regex [find-and-replace] Replace-all error in multiple files with regex Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant