Skip to content

Commit 2200a62

Browse files
committed
Use Monokai by default when code_editor is used
1 parent 7128c28 commit 2200a62

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/textual/widgets/_text_area.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def code_editor(
431431
text: str = "",
432432
*,
433433
language: str | None = None,
434-
theme: str | None = None,
434+
theme: str | None = "monokai",
435435
soft_wrap: bool = False,
436436
tab_behaviour: Literal["focus", "indent"] = "indent",
437437
show_line_numbers: bool = True,

tests/snapshot_tests/snapshot_apps/text_area_wrapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

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

2828

2929
app = TextAreaWrapping()

tests/snapshot_tests/test_snapshots.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,7 @@ def setup_theme(pilot):
879879
@pytest.mark.syntax
880880
def test_text_area_wrapping_and_folding(snap_compare):
881881
assert snap_compare(
882-
SNAPSHOT_APPS_DIR / "text_area_wrapping.py",
883-
terminal_size=(20, 26)
882+
SNAPSHOT_APPS_DIR / "text_area_wrapping.py", terminal_size=(20, 26)
884883
)
885884

886885

0 commit comments

Comments
 (0)