From c50e03f09363ea2bd2b64d478e9bbf7e19b3f4ab Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sun, 9 Oct 2022 00:32:56 +0000 Subject: [PATCH] fix unexpected deselection behavior --- src/nat/ArchiveController.kiss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nat/ArchiveController.kiss b/src/nat/ArchiveController.kiss index 44d3e01..8e91dc5 100644 --- a/src/nat/ArchiveController.kiss +++ b/src/nat/ArchiveController.kiss @@ -4,7 +4,7 @@ (case arg.type (SelectedEntry (if (= 1 _selectedEntries.length) - (continuation (first _selectedEntries)) + (continuation (first (getSelectedEntries))) (ui.reportError "The requested command expects 1 entry to be selected. You have selected: $_selectedEntries.length"))) ((SelectedEntries min max) (unless min (set min 0)) @@ -12,7 +12,7 @@ (unless max (set max (count archive.entries))) (if !(<= min _selectedEntries.length max) (ui.reportError "The requested command expects between $min and $max entries to be selected. You have selected: $_selectedEntries.length") - (continuation _selectedEntries))) + (continuation (getSelectedEntries)))) ((Text maxLength) (unless maxLength (set maxLength Math.POSITIVE_INFINITY)) (stream.dropWhitespace) @@ -366,6 +366,7 @@ (defCommand SwitchPlayground [name (Text null)] (archive.changePlaygrounds ->:Void [:DynamicAccess p] (dictSet p "default" name)) + (SelectEntries []) (when playgroundSystem (playgroundSystem.switchPlaygroundKey name)) [])