Add alternate array index style, with setting

This commit is contained in:
2024-10-07 00:58:34 +02:00
parent 0e1354bd47
commit 73ac4dd3f6
3 changed files with 13 additions and 2 deletions

View File

@@ -806,7 +806,7 @@ class Editor
'quotedKeys' => (Settings::$editorQuotedKeys?$mark:$clear)."Quoted keys",
'tailLine' => (Settings::$tailLine?$mark:$clear)."Show tail line",
'indentationGuides' => (Settings::$indentationGuides?$mark:$clear)."Show indentation guides",
//'done' => " Done"
'highlightIndices' => (Settings::$highlightIndices?$mark:$clear)."Highlight array indices",
];
$sel = (new Menu($this->term, $items, "Settings"))
->display(0, 0, 40, 0, $sel);
@@ -827,6 +827,9 @@ class Editor
case 'indentationGuides':
Settings::$indentationGuides = !Settings::$indentationGuides;
break;
case 'highlightIndices':
Settings::$highlightIndices = !Settings::$highlightIndices;
break;
}
} while ($sel);
$this->redrawEditor();