Skip to content

Commit

Permalink
Ensure that TextArea inserts via keyboard have sorted start/end
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Mar 18, 2024
1 parent 2cb60d6 commit 6da3087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ async def _on_key(self, event: events.Key) -> None:
# `insert` is not None because event.character cannot be
# None because we've checked that it's printable.
assert insert is not None
start, end = self.selection
start, end = sorted(self.selection)
self._replace_via_keyboard(insert, start, end)

def _find_columns_to_next_tab_stop(self) -> int:
Expand Down

0 comments on commit 6da3087

Please sign in to comment.