1
0
Fork 0
mirror of https://git.sr.ht/~rjarry/aerc synced 2026-03-14 11:46:21 +01:00
aerc/commands/account
Arjuna Del Toso 841270ea47 dirtree: add toggle-folder command
Add a new :toggle-folder command that toggles the expand/collapse state
of a folder in the directory tree view. This provides a convenient
single command alternative to using :expand-folder and :collapse-folder
separately.

The toggle behavior is consistent with existing commands:
- For folders with children: toggles the folder's own hidden state
- For leaf nodes: toggles the parent folder (same as collapse)
- For root nodes without children: no-op (nothing to toggle)

Also add comprehensive unit tests for collapse, expand, and toggle
folder operations covering top-level, nested, and deeply nested folders.

Changelog-added: `:toggle-folder` command to toggle directory tree
 expand/collapse state.
Signed-off-by: Arjuna Del Toso <arjuna@deltoso.net>
Tested-by: Inwit <inwit@sindominio.net>
Acked-by: Robin Jarry <robin@jarry.cc>
2026-03-07 21:15:56 +01:00
..
align.go commands: quote and add space to completions by default 2025-11-17 09:51:00 +01:00
cf.go commands: strip traiilng space when using cf with notmuch 2026-02-13 09:08:31 +01:00
check-mail.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
clear.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00
compose.go reload: fix crash when reloading via IPC 2025-09-23 14:02:37 +02:00
connection.go messages: generalize cancellation context 2026-02-09 14:46:27 +01:00
expand-folder.go dirtree: add toggle-folder command 2026-03-07 21:15:56 +01:00
export-mbox.go worker: add explicit directory to action messages 2026-02-09 14:46:27 +01:00
import-mbox.go import-mbox: unzip compressed mboxes 2024-11-09 18:48:19 +01:00
mkdir.go messages: generalize cancellation context 2026-02-09 14:46:27 +01:00
next-folder.go commands: add -u option to {next,prev}-folder 2025-05-05 14:26:52 +02:00
next-result.go completion: add commands descriptions 2024-10-23 10:22:51 +02:00
next.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
query.go commands: quote and add space to completions by default 2025-11-17 09:51:00 +01:00
recover.go compose: create temp files in system's state dir 2025-10-30 21:17:44 +01:00
rmdir.go messages: generalize cancellation context 2026-02-09 14:46:27 +01:00
search.go commands: quote and add space to completions by default 2025-11-17 09:51:00 +01:00
select.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
sort.go commands: quote and add space to completions by default 2025-11-17 09:51:00 +01:00
split.go commands: allow positional arguments starting with "-" 2025-03-31 16:35:54 +02:00
toggle-sidebar.go commands: add :toggle-sidebar command 2025-11-29 21:08:34 +01:00
view.go completion: add command option descriptions 2024-10-23 10:22:51 +02:00