Skip to content

Commit

Permalink
Remove unnecessary argument from lsp_symbol_rename command
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann authored and rwols committed Feb 5, 2024
1 parent 8696a5d commit ab33520
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 @@ -64,7 +64,6 @@ def is_visible(
self,
new_name: str = "",
placeholder: str = "",
position: Optional[int] = None,
event: Optional[dict] = None,
point: Optional[int] = None
) -> bool:
Expand Down Expand Up @@ -97,14 +96,13 @@ def run(
edit: sublime.Edit,
new_name: str = "",
placeholder: str = "",
position: Optional[int] = None,
event: Optional[dict] = None,
point: Optional[int] = None
) -> None:
listener = self.get_listener()
if listener:
listener.purge_changes_async()
location = position if position is not None else get_position(self.view, event, point)
location = get_position(self.view, event, point)
prepare_provider_session = self.best_session("renameProvider.prepareProvider")
if new_name or placeholder or not prepare_provider_session:
if location is not None and new_name:
Expand Down Expand Up @@ -161,7 +159,7 @@ def _on_prepare_result(self, pos: int, response: Optional[PrepareRenameResult])
pos = range_to_region(response["range"], self.view).a # type: ignore
else:
placeholder = self.view.substr(self.view.word(pos))
args = {"placeholder": placeholder, "position": pos}
args = {"placeholder": placeholder, "point": pos}
self.view.run_command("lsp_symbol_rename", args)

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

0 comments on commit ab33520

Please sign in to comment.