diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-09-05 20:34:56 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-09-05 20:34:56 -0300 |
commit | e3a455fc3791539275fdb6aff003ffa8460f8850 (patch) | |
tree | cddd898f1264c5f225b3845765b3c82431e5fe8c /src/Lazymail/State.hs | |
parent | 3bd3fd2c6eae2f36f69f247403421e8cf8226394 (diff) |
rename scrolling functions
Diffstat (limited to 'src/Lazymail/State.hs')
-rw-r--r-- | src/Lazymail/State.hs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/Lazymail/State.hs b/src/Lazymail/State.hs index 06353da..1323118 100644 --- a/src/Lazymail/State.hs +++ b/src/Lazymail/State.hs @@ -75,51 +75,6 @@ scrRowsAsInteger st = toInteger $ screenRows st curRowAsInteger st = toInteger $ currentRow st colPadAsInteger st = toInteger $ columnPadding st - -incrementSelectedRow st | (selectedRow st) < limit = - case (mode st) of - MaildirMode -> - let - sr = (selectedRowMD . maildirState) st - maildirState' = (maildirState st) { selectedRowMD = sr + 1 } - in - st { maildirState = maildirState' } - IndexMode -> - let - sr = (selectedRowIn . indexState) st - indexState' = (indexState st) { selectedRowIn = sr + 1 } - in - st { indexState = indexState' } - _ -> st - | otherwise = st - where - scrRows = screenRows st - curInLen = length $ selectedEmails . indexState $ st - curMDLen = length $ detectedMDs . maildirState $ st - limit' = case (mode st) of - MaildirMode -> if curMDLen < scrRows then curMDLen - 1 else scrRows - IndexMode -> if curInLen < scrRows then curInLen - 1 else scrRows - limit = if (statusBar st) && (limit' == scrRows) - then fromIntegral $ limit' - 2 - else fromIntegral limit' - -decrementSelectedRow st | (selectedRow st) > 0 = - case (mode st) of - MaildirMode -> - let - sr = (selectedRowMD . maildirState) st - maildirState' = (maildirState st) { selectedRowMD = sr - 1 } - in - st { maildirState = maildirState' } - IndexMode -> - let - sr = (selectedRowIn . indexState) st - indexState' = (indexState st) { selectedRowIn = sr - 1 } - in - st { indexState = indexState' } - _ -> st - | otherwise = st - selectedRow st = case (mode st) of MaildirMode -> selectedRowMD . maildirState $ st IndexMode -> selectedRowIn . indexState $ st |