From 7de5487279b2bfaa78909db5efc038f0da6a0da0 Mon Sep 17 00:00:00 2001 From: yory8 <> Date: Thu, 4 Apr 2019 10:21:20 +0200 Subject: [PATCH] exit on empty history --- selector.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selector.go b/selector.go index 487c15a..22ffcbb 100644 --- a/selector.go +++ b/selector.go @@ -28,6 +28,10 @@ func selector(history []string, max int) error { } func dmenu(list []string, max int) (string, error) { + if len(list) == 0 { + return "", nil + } + args := []string{"dmenu", "-b", "-fn", "-misc-dejavu sans mono-medium-r-normal--17-120-100-100-m-0-iso8859-16",