Skip to content

Commit

Permalink
fix(text area): update code editor constructor
Browse files Browse the repository at this point in the history
Update the `TextArea.code_editor` convenience constructor to include the
new `read_only` and `max_checkpoints` attributes.
  • Loading branch information
TomJGooding committed Feb 16, 2024
1 parent 8007c8f commit f4e69b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ def code_editor(
theme: str = "monokai",
soft_wrap: bool = False,
tab_behavior: Literal["focus", "indent"] = "indent",
read_only: bool = False,
show_line_numbers: bool = True,
max_checkpoints: int = 50,
name: str | None = None,
id: str | None = None,
classes: str | None = None,
Expand Down Expand Up @@ -491,7 +493,9 @@ def code_editor(
theme=theme,
soft_wrap=soft_wrap,
tab_behavior=tab_behavior,
read_only=read_only,
show_line_numbers=show_line_numbers,
max_checkpoints=max_checkpoints,
name=name,
id=id,
classes=classes,
Expand Down

0 comments on commit f4e69b8

Please sign in to comment.