aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorc.lopez <c.lopez@kmels.net>2012-08-26 10:31:37 +0200
committerc.lopez <c.lopez@kmels.net>2012-08-26 10:31:37 +0200
commitc843d799140aacaf27cfadad545e485f35e1d385 (patch)
tree80e94ff3a4fd914f1f0d0e208a9fe6c4ba091eaf
parent299ab12790d16ad47f986fe2629a418033d13881 (diff)
downloadXMonadContrib-c843d799140aacaf27cfadad545e485f35e1d385.tar.gz
XMonadContrib-c843d799140aacaf27cfadad545e485f35e1d385.tar.xz
XMonadContrib-c843d799140aacaf27cfadad545e485f35e1d385.zip
fix a bug when ncompletions
Ignore-this: 5f573028318473c333809217c271a81d darcs-hash:20120826083137-c3db2-f1fe3b8e2603aeffc888411261f364de2b4ef576.gz
-rw-r--r--XMonad/Prompt.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/XMonad/Prompt.hs b/XMonad/Prompt.hs
index 0627b39..2548a56 100644
--- a/XMonad/Prompt.hs
+++ b/XMonad/Prompt.hs
@@ -527,12 +527,11 @@ completionHandle _ k e = handle k e
nextComplIndex :: XPState -> Int -> (Int,Int)
nextComplIndex st nitems = case complWinDim st of
Nothing -> (0,0) --no window dims (just destroyed or not created)
- Just winDim -> let
- (_,_,_,_,_,yy) = winDim
+ Just (_,_,_,_,_,yy) -> let
(ncols,nrows) = (nitems `div` length yy + if (nitems `mod` length yy > 0) then 1 else 0, length yy)
(currentcol,currentrow) = complIndex st
in if (currentcol + 1 >= ncols) then --hlight is in the last column
- if (currentrow + 1 < (nitems `mod` nrows) ) then --hlight is still not at the last row
+ if (currentrow + 1 < nrows ) then --hlight is still not at the last row
(currentcol, currentrow + 1)
else
(0,0)