Skip to content

Commit

Permalink
simplify paste
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Dec 6, 2024
1 parent b2bc4c9 commit 1e6f331
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -2225,9 +2225,9 @@ def action_paste(self) -> None:
"""Paste from local clipboard."""
if self.read_only:
return
clipboard = self.app._clipboard
start, end = self.selection
self._replace_via_keyboard(clipboard, start, end)
clipboard = self.app.clipboard
if result := self._replace_via_keyboard(clipboard, *self.selection):
self.move_cursor(result.end_location)

def action_delete_to_start_of_line(self) -> None:
"""Deletes from the cursor location to the start of the line."""
Expand Down

0 comments on commit 1e6f331

Please sign in to comment.