From 41b16df2db3920b59d1c13a468e848e68111058b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Thu, 5 Sep 2013 23:52:04 -0300 Subject: Code clean-up --- src/Lazymail/Keymap.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Lazymail/Keymap.hs') diff --git a/src/Lazymail/Keymap.hs b/src/Lazymail/Keymap.hs index c649faa..cdd57cc 100644 --- a/src/Lazymail/Keymap.hs +++ b/src/Lazymail/Keymap.hs @@ -32,8 +32,8 @@ defaultComposeKeymap = [] -- | Try to find a keymap for the current mode. If nothing is found, then -- try looking up in the global keymap. findHandler st cfg ev = case modeHandler (mode st) ev of - Nothing -> globalHandler ev - Just h -> Just h -- I think I saw a way of using an as-pattern in this case + Nothing -> globalHandler ev + h@Just{} -> h where modeHandler MaildirMode = lookupHandler $ maildirModeKeymap cfg modeHandler IndexMode = lookupHandler $ indexModeKeymap cfg -- cgit v1.2.3