diohsc 0.1.14.4 → 0.1.14.5
raw patch · 4 files changed
+18/−14 lines, 4 files
Files
- Makefile +1/−1
- Pager.hs +15/−11
- Version.hs +1/−1
- diohsc.cabal +1/−1
Makefile view
@@ -1,4 +1,4 @@-VERSION=0.1.14.4+VERSION=0.1.14.5 GHCOPTS=-threaded -DICONV -DMAGIC -ignore-package regex-compat-tdfa
Pager.hs view
@@ -13,17 +13,15 @@ module Pager where -import Control.Exception (throw)-import Control.Monad (when)-import Control.Monad.IO.Class (MonadIO, liftIO)-import Data.Char (toLower)-import Data.Maybe (fromMaybe, isJust)-import Safe (readMay)-import System.IO (hFlush, stdout)+import Control.Monad (when)+import Control.Monad.IO.Class (MonadIO, liftIO)+import Data.Char (toLower)+import Data.Maybe (fromMaybe, isJust)+import Safe (readMay)+import System.IO (hFlush, stdout) -import qualified Data.Text.Lazy as T-import qualified Data.Text.Lazy.IO as T-import qualified System.Console.Haskeline as HL+import qualified Data.Text.Lazy as T+import qualified Data.Text.Lazy.IO as T import ANSIColour import Prompt@@ -47,7 +45,13 @@ c <- liftIO . promptChar $ drop (col + 4 - termWidth) " --" liftIO $ putStrLn "" case toLower <$> c of- Nothing -> throw HL.Interrupt+ Nothing ->+ -- ^C. Really we'd want to interrupt the download at this+ -- point, i.e. get an interrupt into the BSChan read. However,+ -- I see no way to do that, so instead we require the user to+ -- ^C a second time. Simply throwing a signal here doesn't+ -- work, because then the whole request is aborted.+ return () Just 'q' -> return () Just c' | c' == '\n' || c' == '\r' -> return () Just c' | Just m <- readMay (c':""), m > 0 -> printLinesPaged' m Nothing ls
Version.hs view
@@ -16,4 +16,4 @@ programName = "diohsc" version :: String-version = "0.1.14.4"+version = "0.1.14.5"
diohsc.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: diohsc-version: 0.1.14.4+version: 0.1.14.5 license: GPL-3 license-file: COPYING maintainer: mbays@sdf.org