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

Rename Symbol Not Working #252

Open
ylg opened this issue Jul 14, 2022 · 0 comments
Open

Rename Symbol Not Working #252

ylg opened this issue Jul 14, 2022 · 0 comments

Comments

@ylg
Copy link

ylg commented Jul 14, 2022

Steps

  1. New window, new file foo.rb:

    module Foo
      def bar
        x = "baz"
        puts x
      end
    end
  2. Place cursor before x.

  3. Command Palette: Rename Symbol: enter "y"

Expect

Editor contents become:

module Foo
  def bar
    y = "baz"
    puts y
  end
end

Actual

Toast error message "Rename failed to apply edits" and Log: Window contains:

[2022-07-14 07:10:07.823] [renderer3] [error] Error: Overlapping ranges are not allowed!
    at m.applyEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:577:547)
    at Dn._doApplyEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:744:1577)
    at Dn.applyEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:744:1390)
    at b.pushEditOperation (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:596:909)
    at Dn._pushEditOperations (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:744:305)
    at Dn.pushEditOperations (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:742:839)
    at b.executeEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:618:475)
    at vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:750:3243
    at v._withViewEventsCollector (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:750:4876)
    at v._executeCursorEdit (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:750:3155)
    at v.executeEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:750:3208)
    at Tn.executeEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:752:10687)
    at b.apply (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:903:19976)
    at o.apply (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:903:22012)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async g._performTextEdits (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2752:28034)
    at async g.perform (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2752:27417)
    at async v.apply (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:2752:29733)
@ylg ylg changed the title Rename Not Working Rename Symbol Not Working Jul 14, 2022
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

No branches or pull requests

1 participant