Skip to content

Commit 360c41a

Browse files
committed
add missing window arg
1 parent 5876ba0 commit 360c41a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

plugin/code_actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def run_async() -> None:
354354
def _handle_response_async(self, session_name: str, response: Any) -> None:
355355
if isinstance(response, Error):
356356
message = f"{session_name}: {str(response)}"
357-
notify_error(message, message)
357+
notify_error(self.view.window(), message, message)
358358

359359

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

422422
def _is_cache_valid(self, event: dict | None) -> bool:
423423
view = self.view

plugin/rename.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _on_rename_result_async(self, session: Session, response: WorkspaceEdit | No
213213
def _on_prepare_result(self, pos: int, session_name: str | None, response: PrepareRenameResult | None) -> None:
214214
if response is None:
215215
message = "The current selection cannot be renamed"
216-
notify_error(message, message)
216+
notify_error(self.view.window(), message, message)
217217
return
218218
if is_range_response(response):
219219
r = range_to_region(response, self.view)
@@ -229,7 +229,7 @@ def _on_prepare_result(self, pos: int, session_name: str | None, response: Prepa
229229

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

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

0 commit comments

Comments
 (0)