From dd02e81da7f59dff89d4fc4ef803a1c19a93d73d Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 26 Feb 2024 20:38:31 +0100 Subject: Update ui select fun in orgmode --- fnl/plugins/orgmode.fnl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'fnl') diff --git a/fnl/plugins/orgmode.fnl b/fnl/plugins/orgmode.fnl index 288eeb0..0be49c7 100644 --- a/fnl/plugins/orgmode.fnl +++ b/fnl/plugins/orgmode.fnl @@ -50,12 +50,11 @@ (tset options-by-label item.label item))) (vim.ui.select options {:prompt data.prompt} (fn [choice] - ;; FIX: this code block - (when (not choice) - (lua "return ")) - (local option (. options-by-label choice)) - (when option.action - (option.action)))))) + (if choice + (do + (local option (. options-by-label choice)) + (when option.action + (option.action)))))))) (local opts {:org_agenda_files ["~/.local/share/org/**/*"] -- cgit v1.2.3-70-g09d2