From b0c5c9ed693a72c885108d2bf9e80a1f0c5ccb68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 16 Jul 2024 11:11:42 -0700 Subject: [PATCH] don't clean or restore nothing --- internal/tables/tables.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/tables/tables.go b/internal/tables/tables.go index 496e520..a40fb8d 100644 --- a/internal/tables/tables.go +++ b/internal/tables/tables.go @@ -199,12 +199,12 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case key.Matches(msg, m.keys.invr): m.invertSelection() case key.Matches(msg, m.keys.clen): - if m.mode == modes.Interactive { + if m.mode == modes.Interactive && len(m.selected) > 0 { m.mode = modes.Cleaning return m.quit(false) } case key.Matches(msg, m.keys.rstr): - if m.mode == modes.Interactive { + if m.mode == modes.Interactive && len(m.selected) > 0 { m.mode = modes.Restoring return m.quit(false) }