Skip to content

Commit

Permalink
spacial case for tabs in text area
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Aug 27, 2024
1 parent f3ed9df commit c45e560
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 @@ -559,6 +559,8 @@ def check_consume_key(self, key: str) -> bool:
"""
if self.read_only:
return False
if self.tab_behavior == "indent" and key == "tab":
return True
return len(key) == 1 and key.isprintable()

def _build_highlight_map(self) -> None:
Expand Down

0 comments on commit c45e560

Please sign in to comment.