Skip to content

Commit

Permalink
add missing window arg
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed Nov 7, 2024
1 parent 5876ba0 commit 360c41a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugin/code_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def run_async() -> None:
def _handle_response_async(self, session_name: str, response: Any) -> None:
if isinstance(response, Error):
message = f"{session_name}: {str(response)}"
notify_error(message, message)
notify_error(self.view.window(), message, message)


# This command must be a WindowCommand in order to reliably hide corresponding menu entries when no view has focus.
Expand Down Expand Up @@ -417,7 +417,7 @@ def run_async(self, index: int, event: dict | None) -> None:
def _handle_response_async(self, session_name: str, response: Any) -> None:
if isinstance(response, Error):
message = f"{session_name}: {str(response)}"
notify_error(message, message)
notify_error(self.window, message, message)

def _is_cache_valid(self, event: dict | None) -> bool:
view = self.view
Expand Down
4 changes: 2 additions & 2 deletions plugin/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def _on_rename_result_async(self, session: Session, response: WorkspaceEdit | No
def _on_prepare_result(self, pos: int, session_name: str | None, response: PrepareRenameResult | None) -> None:
if response is None:
message = "The current selection cannot be renamed"
notify_error(message, message)
notify_error(self.view.window(), message, message)
return
if is_range_response(response):
r = range_to_region(response, self.view)
Expand All @@ -229,7 +229,7 @@ def _on_prepare_result(self, pos: int, session_name: str | None, response: Prepa

def _on_prepare_error(self, error: Any) -> None:
message = "Rename error: {}".format(error["message"])
notify_error(message, message)
notify_error(self.view.window(), message, message)

def _get_relative_path(self, file_path: str) -> str:
wm = windows.lookup(self.view.window())
Expand Down

0 comments on commit 360c41a

Please sign in to comment.