Skip to content

Commit

Permalink
Use Monokai by default when code_editor is used
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenburns committed Feb 1, 2024
1 parent 7128c28 commit 2200a62
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/textual/widgets/_text_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def code_editor(
text: str = "",
*,
language: str | None = None,
theme: str | None = None,
theme: str | None = "monokai",
soft_wrap: bool = False,
tab_behaviour: Literal["focus", "indent"] = "indent",
show_line_numbers: bool = True,
Expand Down
2 changes: 1 addition & 1 deletion tests/snapshot_tests/snapshot_apps/text_area_wrapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class TextAreaWrapping(App):
def compose(self) -> ComposeResult:
yield TextArea.code_editor(TEXT, language="markdown", soft_wrap=True)
yield TextArea.code_editor(TEXT, language="markdown", theme="monokai", soft_wrap=True)


app = TextAreaWrapping()
Expand Down
3 changes: 1 addition & 2 deletions tests/snapshot_tests/test_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,7 @@ def setup_theme(pilot):
@pytest.mark.syntax
def test_text_area_wrapping_and_folding(snap_compare):
assert snap_compare(
SNAPSHOT_APPS_DIR / "text_area_wrapping.py",
terminal_size=(20, 26)
SNAPSHOT_APPS_DIR / "text_area_wrapping.py", terminal_size=(20, 26)
)


Expand Down

0 comments on commit 2200a62

Please sign in to comment.