aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-08-27 00:40:46 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-08-27 00:40:46 -0300
commitf21a1f23ab53ab628ed2677c8d85869fa7e22b45 (patch)
treedf3fe3aabf833cee019f4406b19f1299e92fa602
parent05d6b5f93cd1ed5e9c4f4f9d63cf392ada048afb (diff)
Improve identing
-rw-r--r--State.hs58
1 files changed, 30 insertions, 28 deletions
diff --git a/State.hs b/State.hs
index f9623dc..5b91d15 100644
--- a/State.hs
+++ b/State.hs
@@ -101,20 +101,21 @@ 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
+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
limit' = case (mode st) of
@@ -124,20 +125,21 @@ incrementSelectedRow st | (selectedRow st) < limit = case (mode st) of
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
+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
nihil fit ex nihilo