Add makefile, cli options
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user