From 014d7a59d6522febf639e3a0f3801271e9aec4ab Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 28 Jul 2014 03:01:07 +0200 Subject: use the same mode and buffer everywhere --- Main.hs | 9 ++++++--- 1 file 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 -- cgit v1.2.3