summaryrefslogtreecommitdiffstats
path: root/Main.hs
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2014-07-28 03:01:07 +0200
committertv <tv@shackspace.de>2014-07-28 03:01:07 +0200
commit014d7a59d6522febf639e3a0f3801271e9aec4ab (patch)
treebb281a728174e6dd6baf66cb8a2ed677205e1c72 /Main.hs
parentd81bf549eb17990e785feb1182242fb4a322ad1b (diff)
use the same mode and buffer everywhere
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Main.hs b/Main.hs
index 395db91..4f15418 100644
--- a/Main.hs
+++ b/Main.hs
@@ -45,10 +45,13 @@ main = do
-- WINCH
-- TODO installHandler 28 (Catch $ ioctl 0 ...) Nothing
- modeRef <- newIORef InsertMode
- lock <- newMVar emptyBuffer
+ let m = InsertMode
+ b = ("", "")
- renderInputLine InsertMode emptyBuffer
+ modeRef <- newIORef m
+ lock <- newMVar b
+
+ renderInputLine m b
hFlush stdout
forkIO $ dateThread 1000000 modeRef lock