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

Restrict rename operation to current workspace folder(s) #9235

Closed
lijh8 opened this issue Apr 25, 2022 · 4 comments
Closed

Restrict rename operation to current workspace folder(s) #9235

lijh8 opened this issue Apr 25, 2022 · 4 comments
Assignees
Labels
enhancement Improvement to an existing feature Feature: Rename fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Milestone

Comments

@lijh8
Copy link

lijh8 commented Apr 25, 2022

Environment

  • OS and version: macOS 12.3.1
  • VS Code: 1.66.2
  • C/C++ extension: ms-vscode.cpptools v1.9.8
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version:

Bug Summary and Steps to Reproduce

Bug Summary:

  1. Rename by F2
  2. It searches even the symbols in system library, it's dangerous because I'm root user and I may change system files by mistake because of this
  3. It's slower than find & replace
  4. restrict Rename to current directory, opened files or current file, make it configurable.

Screen Shot 2022-04-25 at 16 31 47

Steps to reproduce:

  1. In this environment...
  2. With this config...
  3. Do '...'
  4. See error...

Debugger Configurations

None

Debugger Logs

None

Other Extensions

No response

Additional Information

No response

@lijh8 lijh8 changed the title Restrict rename to directory wide Restrict rename to current directory Apr 25, 2022
@Colengms
Copy link
Contributor

Hi @ljhm . Thanks for reporting this. We can use this issue to track adding a setting to allow renaming to be restricted to files within the current workspace folder(s) (which should probably be the default). We should also exclude files under known system include paths (that we discover when querying the compiler).

@Colengms Colengms added Language Service Feature: Rename enhancement Improvement to an existing feature labels Apr 25, 2022
@Colengms Colengms added this to the On Deck milestone Apr 25, 2022
@Colengms Colengms changed the title Restrict rename to current directory Restrict rename operation to current workspace folder(s) Apr 25, 2022
@Colengms
Copy link
Contributor

#4102 might be related. Rename uses Find All References under the hood.

@sean-mcmanus
Copy link
Contributor

Yeah, #4102 is the same root issue, but it's more generalized so having this specific case open might still be useful if we wanted to do a more targeted fix.

@Bernardin-MS Bernardin-MS self-assigned this Dec 8, 2022
@michelleangela michelleangela modified the milestones: On Deck, 1.14 Dec 8, 2022
@sean-mcmanus sean-mcmanus modified the milestones: 1.14, 1.14.1 Jan 24, 2023
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jan 24, 2023
@sean-mcmanus
Copy link
Contributor

A fix is available with 1.14.1 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.14.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Improvement to an existing feature Feature: Rename fixed Check the Milestone for the release in which the fix is or will be available. Language Service
Projects
None yet
Development

No branches or pull requests

5 participants