Skip to content

Commit

Permalink
Fix XMonad.Prompt wraparound when maxComplRows not Nothing xmonad#217
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Jan 24, 2019
1 parent a774168 commit 876b1b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XMonad/Prompt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ 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 (_,_,_,_,_,yy) -> let
(ncols,nrows) = (nitems `div` length yy + if (nitems `mod` length yy > 0) then 1 else 0, length yy)
Just (_,_,_,_,xx,yy) -> let
(ncols,nrows) = (length xx, length yy)
(currentcol,currentrow) = complIndex st
in if (currentcol + 1 >= ncols) then --hlight is in the last column
if (currentrow + 1 < nrows ) then --hlight is still not at the last row
Expand Down

0 comments on commit 876b1b2

Please sign in to comment.