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

[smart_rename] Did not work when rename variable more than one time #25

Open
hiberabyss opened this issue Jul 14, 2021 · 3 comments
Open
Labels
bug Something isn't working

Comments

@hiberabyss
Copy link

For the following function, the second time will fail when try to rename test twice:

void hello() {
  int test3 = 123;
  test3 = 456;
  std::cout << test3 << std::endl;
}
@hiberabyss hiberabyss added the bug Something isn't working label Jul 14, 2021
@stsewd
Copy link
Member

stsewd commented Jul 18, 2021

Hi, can you be more specific. What you mean with "rename twice"?

I tried

void hello() {
  int test3 = 123;
  test3 = 456;
  std::cout << test3 << std::endl;
}

With the cursor under int test3 =, rename to test, and then again, rename to test2. It works as expected for me.

@hiberabyss
Copy link
Author

Hi, can you be more specific. What you mean with "rename twice"?

I tried

void hello() {
  int test3 = 123;
  test3 = 456;
  std::cout << test3 << std::endl;
}

With the cursor under int test3 =, rename to test, and then again, rename to test2. It works as expected for me.

For my case, there will be following wrong indication when try to rename test:

image

@stsewd
Copy link
Member

stsewd commented Jul 18, 2021

@hiberabyss can you provide the exact steps (and the cursor position) with a minimal init.vim?

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

2 participants