Skip to content

Commit 73fec79

Browse files
committed
Tweak Terminal formatting so lists render correctly.
Fixes micropython#10473
1 parent a9a5b67 commit 73fec79

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

shared-bindings/terminalio/Terminal.c

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,18 @@
2424
//| """Display a character stream with a TileGrid
2525
//|
2626
//| ASCII control:
27+
//|
2728
//| * ``\\r`` - Move cursor to column 1
2829
//| * ``\\n`` - Move cursor down a row
2930
//| * ``\\b`` - Move cursor left one if possible
3031
//|
3132
//| OSC control sequences:
33+
//|
3234
//| * ``ESC ] 0; <s> ESC \\`` - Set title bar to <s>
3335
//| * ``ESC ] ####; <s> ESC \\`` - Ignored
3436
//|
3537
//| VT100 control sequences:
38+
//|
3639
//| * ``ESC [ K`` - Clear the remainder of the line
3740
//| * ``ESC [ 0 K`` - Clear the remainder of the line
3841
//| * ``ESC [ 1 K`` - Clear start of the line to cursor
@@ -50,16 +53,28 @@
5053
//| * ``ESC [ ## ; ## ; ## m`` - Set the terminal display attributes.
5154
//|
5255
//| Supported Display attributes:
53-
//| 0 - Reset all attributes
54-
//| Foreground Colors Background Colors
55-
//| 30 - Black 40 - Black
56-
//| 31 - Red 41 - Red
57-
//| 32 - Green 42 - Green
58-
//| 33 - Yellow 43 - Yellow
59-
//| 34 - Blue 44 - Blue
60-
//| 35 - Magenta 45 - Magenta
61-
//| 36 - Cyan 46 - Cyan
62-
//| 37 - White 47 - White
56+
//|
57+
//| +--------+------------+------------+
58+
//| | Color | Foreground | Background |
59+
//| +========+============+============+
60+
//| | Reset | 0 | 0 |
61+
//| +--------+------------+------------+
62+
//| | Black | 30 | 40 |
63+
//| +--------+------------+------------+
64+
//| | Red | 31 | 41 |
65+
//| +--------+------------+------------+
66+
//| | Green | 32 | 42 |
67+
//| +--------+------------+------------+
68+
//| | Yellow | 33 | 43 |
69+
//| +--------+------------+------------+
70+
//| | Blue | 34 | 44 |
71+
//| +--------+------------+------------+
72+
//| | Magenta| 35 | 45 |
73+
//| +--------+------------+------------+
74+
//| | Cyan | 36 | 46 |
75+
//| +--------+------------+------------+
76+
//| | White | 37 | 47 |
77+
//| +--------+------------+------------+
6378
//| """
6479
//|
6580
//| def __init__(

0 commit comments

Comments
 (0)