on master help sign in
cleanup
commiteb15f2604c027685980bc0905283887f51b42759 authorCorey O'Connor <corey@ooyala.com> dateWed 22 Jan 2014, 00:23 (13 years ago) parent4f93146
2 files changed+5−4
src/Graphics/Vty/Input.hs+1−1 src/Graphics/Vty/Input/Internal.hs+4−3
src/Graphics/Vty/Input.hs+1−1
@@ -72,7 +72,7 @@ input_for_current_terminal config = do
7272-- - disables software flow control on outgoing data. This stops the process from being
7373-- suspended if the output terminal cannot keep up. I presume this has little effect these
7474-- days. I hope this means that output will be buffered if the terminal cannot keep up. In the
75−-- old days the output might of been dropped.
75+-- old days the output might of been dropped?
7676--
7777-- "raw" mode is used for input.
7878--
src/Graphics/Vty/Input/Internal.hs+4−3
@@ -14,7 +14,7 @@ import Control.Applicative
1414import Control.Concurrent
1515import Control.Lens
1616import Control.Exception (try, IOException)
17−import Control.Monad (when, void, mzero)
17+import Control.Monad (when, void, mzero, forM_)
1818import Control.Monad.IO.Class (liftIO)
1919import Control.Monad.Trans.State (StateT(..), evalStateT)
2020import Control.Monad.Trans.Reader (ReaderT(..))
@@ -89,7 +89,8 @@ type InputM a = StateT InputState (ReaderT Input IO) a
8989loop_input_processor :: InputM ()
9090loop_input_processor = do
9191 read_from_device >>= add_bytes_to_process
92− _ <- many $ parse_event >>= emit
92+ valid_events <- many parse_event
93+ forM_ valid_events emit
9394 drop_invalid
9495 stop_if_requested <|> loop_input_processor
9596
@@ -116,7 +117,7 @@ read_from_device = do
116117apply_timing_config :: Fd -> Config -> IO ()
117118apply_timing_config fd config =
118119 let vtime = min 255 $ singleEscPeriod config `div` 100000
119− in set_term_timing fd 1 vtime
120+ in set_term_timing fd 0 vtime
120121
121122parse_event :: InputM Event
122123parse_event = do