packages feed

hmp3-ng 2.16.1 → 2.16.2

raw patch · 5 files changed

+19/−18 lines, 5 files

Files

Core.hs view
@@ -600,7 +600,7 @@         histVisible = Just $ do             (tm, ix) <- toList $ playHist st             pure (UTF8.toString $ showTimeDiff_ True tm now-                , UTF8.toString $ fbase $ music st ! ix)+                , (ix, UTF8.toString $ fbase $ music st ! ix))         }  -- | Toggle the mode flag
Keymap.hs view
@@ -37,7 +37,7 @@  import Core import Config       (package)-import State        (getsST, touchST, HState(helpVisible, playHist))+import State        (getsST, touchST, HState(helpVisible, histVisible)) import Style        (defaultSty, StringA(Fast)) import qualified UI (resetui) import Lexers       ((>||<),action,meta,execLexer@@ -47,7 +47,6 @@  import qualified Data.ByteString.Char8 as P import qualified Data.Map as M-import qualified Data.Sequence as Seq  data Direction = Forwards | Backwards data Zipper = Zipper { cur :: !String, back :: ![String], front :: ![String] }@@ -120,9 +119,9 @@     touchST  updateSearch :: (Zipper -> Zipper) -> SearchState -> MetaTarget-updateSearch f st@(SearchState _ spec) =+updateSearch f sst@(SearchState _ spec) =     let spec' = spec{ schZipper = f $ schZipper spec }-    in (printSearch spec', st{schSpec=spec'}, Just dosearch)+    in (printSearch spec', sst{schSpec=spec'}, Just dosearch)  search_char :: LexerS search_char = anyNonSpecial `meta` \c -> updateSearch $ zipEdit (++ c)@@ -168,30 +167,32 @@  history :: LexerS history = alt ['H', ';'] `meta`-        \_ st -> (with (showHist *> touchST), st, Just inner) where+        \_ sst -> (with (showHist *> touchST), sst, Just inner) where     inner =-        alt any' `meta` (\_ st -> (with (hideHist *> touchST), st, Just allKeys))+        alt any' `meta` (\_ sst -> (with (hideHist *> touchST), sst, Just allKeys))         >||< alt ['0'..'9'] `meta` handleKey '0' 0         >||< alt ['a'..'z'] `meta` handleKey 'a' 10-    handleKey base off cs st =+    handleKey base off cs sst =         (with do-            ph <- getsST playHist+            phm <- getsST histVisible             for_-                do ph Seq.!? (fromEnum (head cs) - (fromEnum base - off))-                do jump . snd+                do phm >>= (!? (fromEnum (head cs) - (fromEnum base - off)))+                do jump . fst . snd             hideHist             touchST-        , st+        , sst         , Just allKeys         )+    -- Compatibility: List.!? only added in GHC 9.8+    xs !? n = listToMaybe $ drop n xs  ------------------------------------------------------------------------  confirmQuit :: LexerS confirmQuit = char 'q' `meta`-                \_ st -> (with (forcePause *> toggleExit *> touchST), st, Just inner) where-    inner = alt any' `meta` (\_ st -> (with (toggleExit *> touchST), st, Just allKeys))-            >||< char 'y' `meta` (\_ st -> (with $ quit Nothing, st, Nothing))+                \_ sst -> (with (forcePause *> toggleExit *> touchST), sst, Just inner) where+    inner = alt any' `meta` (\_ sst -> (with (toggleExit *> touchST), sst, Just allKeys))+            >||< char 'y' `meta` (\_ sst -> (with $ quit Nothing, sst, Nothing))  ------------------------------------------------------------------------ 
State.hs view
@@ -64,7 +64,7 @@        ,status          :: !Status        ,minibuffer      :: !StringA              -- contents of minibuffer        ,helpVisible     :: !Bool                 -- is the help window shown?-       ,histVisible     :: !(Maybe [(String, String)]) -- history pop-up if shown+       ,histVisible     :: !(Maybe [(String, (Int, String))]) -- history pop-up if shown        ,exitVisible     :: !Bool                 -- confirm exit modal shown        ,miniFocused     :: !Bool                 -- is the mini buffer focused?        ,mode            :: !Mode                 -- random mode
UI.hs view
@@ -332,7 +332,7 @@         let wd = modalWidth swd             mtlen = maximum $ map (length . fst) hist             tlen = min (mtlen + 1) $ wd `div` 3-        (wd,) $ flip map (zip (['0'..'9']++['a'..'z']) hist) \ (c, (time, song)) ->+        (wd,) $ flip map (zip (['0'..'9']++['a'..'z']) hist) \ (c, (time, (_, song))) ->             let tstr = ellipsize tlen $ replicate (tlen - displayWidth time) ' ' ++ time             in Fast (UTF8.fromString $ forceWidth wd $ ' ' : c : ' ' : tstr ++ ' ' : song) sty 
hmp3-ng.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2  name:           hmp3-ng-version:        2.16.1+version:        2.16.2 synopsis:       A 2019 fork of an ncurses mp3 player written in Haskell description:    An mp3 player with a curses frontend.  Playlists are populated by                 passing file and directory names on the command line.  'h' displays