Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Oct 26, 2024
1 parent 0b46a29 commit 55e864b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugin/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ def _on_rename_result_async(self, session: Session, response: WorkspaceEdit | No
elif choice == sublime.DIALOG_NO:
self._render_rename_panel(response, changes, total_changes, file_count, session.config.name)

def _on_prepare_result(
self, pos: int, preferred_session_name: str | None, response: PrepareRenameResult | None
) -> None:
def _on_prepare_result(self, pos: int, session_name: str | None, response: PrepareRenameResult | None) -> None:
if response is None:
sublime.error_message("The current selection cannot be renamed")
return
Expand All @@ -224,7 +222,7 @@ def _on_prepare_result(
pos = range_to_region(response["range"], self.view).a # type: ignore
else:
placeholder = self.view.substr(self.view.word(pos))
args = {"placeholder": placeholder, "point": pos, "session_name": preferred_session_name}
args = {"placeholder": placeholder, "point": pos, "session_name": session_name}
self.view.run_command("lsp_symbol_rename", args)

def _on_prepare_error(self, error: Any) -> None:
Expand Down

0 comments on commit 55e864b

Please sign in to comment.