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

unexpected behavior with reused placeholders #15

Closed
symphorien opened this issue Feb 11, 2023 · 0 comments · Fixed by #31
Closed

unexpected behavior with reused placeholders #15

symphorien opened this issue Feb 11, 2023 · 0 comments · Fixed by #31

Comments

@symphorien
Copy link

Pattern

[SSR] 2/2 replaced (Press ? for help)    
SEARCH:                                  
$a = $a + $b;                            
REPLACE:                                 
$a += $b;                                
                       

used on rust buffer content:

fn main() {
    a = a + b;
    c = c + d;
}

yields the unexpected output:

fn main() {
    b += a = a + b;;
    d += c = c + d;;
}

instead of

fn main() {
    a += b;
    c += d;
}
cshuaimin added a commit that referenced this issue Aug 10, 2023
cshuaimin added a commit that referenced this issue Aug 10, 2023
cshuaimin added a commit that referenced this issue Aug 10, 2023
cshuaimin added a commit that referenced this issue Aug 11, 2023
@cshuaimin cshuaimin mentioned this issue Aug 11, 2023
cshuaimin added a commit that referenced this issue Aug 14, 2023
cshuaimin added a commit that referenced this issue Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant