Skip to content

Commit

Permalink
read only exception
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Dec 6, 2024
1 parent b7c0215 commit e58141c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,8 @@ def action_copy(self) -> None:

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)
Expand Down

0 comments on commit e58141c

Please sign in to comment.