diff options
author | tv <tv@shackspace.de> | 2014-07-28 03:01:07 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-07-28 03:01:07 +0200 |
commit | 014d7a59d6522febf639e3a0f3801271e9aec4ab (patch) | |
tree | bb281a728174e6dd6baf66cb8a2ed677205e1c72 | |
parent | d81bf549eb17990e785feb1182242fb4a322ad1b (diff) |
use the same mode and buffer everywhere
-rw-r--r-- | Main.hs | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |