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

Remove unnecessary argument from lsp_symbol_rename command #2413

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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