Skip to content

Commit

Permalink
Remove deprecated API function
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed Nov 15, 2024
1 parent 31ce334 commit 30d6121
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugin/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ def _register_async(self) -> None:
def _on_view_updated_async(self) -> None:
if self._should_format_on_paste:
self._should_format_on_paste = False
self._format_on_paste_async()
sublime.get_clipboard_async(self._format_on_paste_async)
self._code_lenses_debouncer_async.debounce(
self._do_code_lenses_async, timeout_ms=self.code_lenses_debounce_time)
first_region, _ = self._update_stored_selection_async()
Expand Down Expand Up @@ -1017,8 +1017,7 @@ def _update_stored_selection_async(self) -> tuple[sublime.Region | None, bool]:
self._stored_selection = selection
return changed_first_region, True

def _format_on_paste_async(self) -> None:
clipboard_text = sublime.get_clipboard()
def _format_on_paste_async(self, clipboard_text: str) -> None:
sel = self.view.sel()
split_clipboard_text = clipboard_text.split('\n')
multi_cursor_paste = len(split_clipboard_text) == len(sel) and len(sel) > 1
Expand Down

0 comments on commit 30d6121

Please sign in to comment.