aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/dirlist.go
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-05-13 12:29:16 +0200
committerRobin Jarry <robin@jarry.cc>2023-05-16 13:56:58 +0200
commit06723ff579b692867c6ab87e3838d04e9d044912 (patch)
treeace4f7fe43eccabd6ec732ebfc8757702fd404cc /widgets/dirlist.go
parentda1f014b7050195d7f3e6f849bc105d87efc227b (diff)
downloadaerc-06723ff579b692867c6ab87e3838d04e9d044912.tar.gz
dirtree: clear msglist for virtual nodes
Clear the message list when a virtual node is selected. Add a VirtualNodeCallback to the Dirlist interface. Reported-by: Tim Culverhouse <tim@timculverhouse.com> Signed-off-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'widgets/dirlist.go')
-rw-r--r--widgets/dirlist.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/widgets/dirlist.go b/widgets/dirlist.go
index 6a10c99a..25d1e7ff 100644
--- a/widgets/dirlist.go
+++ b/widgets/dirlist.go
@@ -31,6 +31,8 @@ type DirectoryLister interface {
List() []string
ClearList()
+ OnVirtualNode(func())
+
NextPrev(int)
CollapseFolder()
@@ -99,6 +101,9 @@ func (dirlist *DirectoryList) ClearList() {
dirlist.dirs = []string{}
}
+func (dirlist *DirectoryList) OnVirtualNode(_ func()) {
+}
+
func (dirlist *DirectoryList) Update(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.Done: