aboutsummaryrefslogtreecommitdiffstats
path: root/Commands.hs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Commands.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Commands.hs b/Commands.hs
index ccb8c55..dcab544 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -102,7 +102,9 @@ runCommand :: [(String, X ())] -> X ()
runCommand cl = do
let m = commandMap cl
choice <- dmenu (M.keys m)
- fromMaybe (return ()) (M.lookup choice m)
+ case choice of
+ Just selection -> fromMaybe (return ()) (M.lookup selection m)
+ Nothing -> return ()
runCommand' :: String -> X ()
runCommand' c = do