diff options
Diffstat (limited to 'XMonad/Actions/FocusNth.hs')
-rw-r--r-- | XMonad/Actions/FocusNth.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/XMonad/Actions/FocusNth.hs b/XMonad/Actions/FocusNth.hs index 8c140cd..af70dc7 100644 --- a/XMonad/Actions/FocusNth.hs +++ b/XMonad/Actions/FocusNth.hs @@ -38,12 +38,13 @@ focusNth :: Int -> X () focusNth = windows . modify' . focusNth' focusNth' :: Int -> Stack a -> Stack a -focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s - | otherwise = listToStack n (integrate s) +focusNth' n s@(Stack _ ls rs) | (n < 0) || (n > length(ls) + length(rs)) = s + | otherwise = listToStack n (integrate s) listToStack :: Int -> [a] -> Stack a listToStack n l = Stack t ls rs - where (t:rs) = drop n l - ls = reverse (take n l) + where + (t:rs) = drop n l + ls = reverse (take n l) |