Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/textual/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,8 @@ def highlight_regex(
plain = self.plain
if isinstance(highlight_regex, str):
re_highlight = re.compile(highlight_regex)
else:
re_highlight = highlight_regex
count = 0
for match in re_highlight.finditer(plain):
start, end = match.span()
Expand Down
18 changes: 0 additions & 18 deletions src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,23 +446,6 @@ class SelectionChanged(Message):
def control(self) -> TextArea:
return self.text_area

@dataclass
class UserInsert(Message):
"""Posted when the user has entered text via the keyboard."""

location: Location
"""The location where the text was added."""

text: str
"""The text that was entered."""

text_area: TextArea
"""The `text_area` that sent this message."""

@property
def control(self) -> TextArea:
return self.text_area

def __init__(
self,
text: str = "",
Expand Down Expand Up @@ -2443,7 +2426,6 @@ def _replace_via_keyboard(
"""
if self.read_only:
return None
self.post_message(self.UserInsert(start, insert, self))
return self.replace(insert, start, end, maintain_selection_offset=False)

def action_delete_left(self) -> None:
Expand Down
Loading