mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-06 15:01:53 -07:00
fix a bug when ncompletions = nrows
This commit is contained in:
@@ -527,12 +527,11 @@ completionHandle _ k e = handle k e
|
|||||||
nextComplIndex :: XPState -> Int -> (Int,Int)
|
nextComplIndex :: XPState -> Int -> (Int,Int)
|
||||||
nextComplIndex st nitems = case complWinDim st of
|
nextComplIndex st nitems = case complWinDim st of
|
||||||
Nothing -> (0,0) --no window dims (just destroyed or not created)
|
Nothing -> (0,0) --no window dims (just destroyed or not created)
|
||||||
Just winDim -> let
|
Just (_,_,_,_,_,yy) -> let
|
||||||
(_,_,_,_,_,yy) = winDim
|
|
||||||
(ncols,nrows) = (nitems `div` length yy + if (nitems `mod` length yy > 0) then 1 else 0, length yy)
|
(ncols,nrows) = (nitems `div` length yy + if (nitems `mod` length yy > 0) then 1 else 0, length yy)
|
||||||
(currentcol,currentrow) = complIndex st
|
(currentcol,currentrow) = complIndex st
|
||||||
in if (currentcol + 1 >= ncols) then --hlight is in the last column
|
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)
|
(currentcol, currentrow + 1)
|
||||||
else
|
else
|
||||||
(0,0)
|
(0,0)
|
||||||
|
Reference in New Issue
Block a user