aboutsummaryrefslogtreecommitdiff
path: root/State.hs
diff options
context:
space:
mode:
Diffstat (limited to 'State.hs')
-rw-r--r--State.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/State.hs b/State.hs
index cb5e426..f4ac3d8 100644
--- a/State.hs
+++ b/State.hs
@@ -89,6 +89,12 @@ initialColorStyle = ColorStyle {
, statusBarColorID = defaultColorID
}
+scrColsAsInteger st = toInteger $ screenColumns st
+scrRowsAsInteger st = toInteger $ screenRows st
+curRowAsInteger st = toInteger $ currentRow st
+colPadAsInteger st = toInteger $ columnPadding st
+
+
{- data MState = MState {
selectedRowMD :: Integer -- Selected row in MaildirMode
@@ -146,11 +152,9 @@ decSelectedRow st | (selectedRow st) > 0 = case (mode st) of
MaildirMode -> st { selectedRowMD = (selectedRowMD st) - 1 }
IndexMode -> st { selectedRowIn = (selectedRowIn st) - 1 }
| otherwise = st
-
+-}
+
selectedRow st = case (mode st) of
- MaildirMode -> selectedRowMD st
- IndexMode -> selectedRowIn st
+ MaildirMode -> selectedRowMD . maildirState $ st
+ IndexMode -> selectedRowIn . indexState $ st
-scrColsAsInt st = fromIntegral $ scrColumns st
-scrRowsAsInt st = fromIntegral $ scrRows st
--} \ No newline at end of file
nihil fit ex nihilo