mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Add flexible spacers to custom statusline layouts (#64009)
## Why Statusline authors can set fixed gaps or justify a whole row. An expandable gap lets them place a field at the far edge by putting a spacer between it and the other fields. ## What changed Add the empty `spacer` element to the statusline renderer and its bundled TypeScript contract. Spacers share the remaining width on each wrapped row line before `justify` is applied. In columns stretched by a taller sibling, spacers share the added height. ## Testing Add renderer tests for wrapped and nested layouts, background fill, and clipping. Cover empty spacer declarations and reject spacer children in the parser and TypeScript contract tests. GitOrigin-RevId: d8bb58304b2a1f10ac0c60ec198aa3c25a169cae
This commit is contained in:
@@ -30,6 +30,7 @@ fn statusline_typescript_contract_matches_the_bundled_reference() -> color_eyre:
|
||||
"RowElement",
|
||||
"ColElement",
|
||||
"BoxElement",
|
||||
"SpacerElement",
|
||||
"CodeElement",
|
||||
"StatuslineItemId",
|
||||
"Color",
|
||||
@@ -70,6 +71,7 @@ fn generate_reference(output: &Path) -> color_eyre::Result<String> {
|
||||
"Row",
|
||||
"Col",
|
||||
"Box",
|
||||
"Spacer",
|
||||
"Code",
|
||||
] {
|
||||
let tag = name.to_ascii_lowercase();
|
||||
|
||||
Reference in New Issue
Block a user