Add makefile, cli options

This commit is contained in:
2024-10-05 16:34:49 +02:00
parent 62c78fa14c
commit eb09b4698f
3 changed files with 76 additions and 17 deletions

View File

@@ -261,21 +261,7 @@ class Editor
break;
case "-":
foreach ($this->list as $path => $entry) {
$node = $entry->node;
if ($path == "/") {
if ($node instanceof CollapsibleNode) {
$node->collapse(false);
}
} else {
if ($node instanceof CollapsibleNode) {
$node->collapse(true);
}
}
}
$this->currentRow = 0;
$this->list->parseTree();
$this->redrawEditor();
$this->doCollapseAll();
break;
case "k{LEFT}":
@@ -732,6 +718,25 @@ class Editor
}
}
public function doCollapseAll(): void
{
foreach ($this->list as $path => $entry) {
$node = $entry->node;
if ($path == "/") {
if ($node instanceof CollapsibleNode) {
$node->collapse(false);
}
} else {
if ($node instanceof CollapsibleNode) {
$node->collapse(true);
}
}
}
$this->currentRow = 0;
$this->list->parseTree();
$this->redrawEditor();
}
/**
* Ask for input
*