loll
This commit is contained in:
parent
7fd27cd635
commit
8fe26d7042
@ -267,7 +267,6 @@ drawFun (BrickState {..}) GEnv{..} =
|
|||||||
|
|
||||||
logicFun :: GEnv -> BrickState -> Event -> IO BrickState
|
logicFun :: GEnv -> BrickState -> Event -> IO BrickState
|
||||||
logicFun _ gs (KeyPress 'q') = pure gs { appQuit = True }
|
logicFun _ gs (KeyPress 'q') = pure gs { appQuit = True }
|
||||||
logicFun _ gs Tick = pure gs
|
|
||||||
logicFun _ gs@BrickState{appMoreInput = Nothing} (KeyPress '\ESC') = pure gs { appMoreInput = Just "\ESC" }
|
logicFun _ gs@BrickState{appMoreInput = Nothing} (KeyPress '\ESC') = pure gs { appMoreInput = Just "\ESC" }
|
||||||
logicFun _ gs@BrickState{appMoreInput = Just "\ESC"} (KeyPress '[') = pure gs { appMoreInput = Just "\ESC[" }
|
logicFun _ gs@BrickState{appMoreInput = Just "\ESC"} (KeyPress '[') = pure gs { appMoreInput = Just "\ESC[" }
|
||||||
logicFun _ gs@BrickState{appMoreInput = Just "\ESC[", appState = s'} (KeyPress 'A')
|
logicFun _ gs@BrickState{appMoreInput = Just "\ESC[", appState = s'} (KeyPress 'A')
|
||||||
@ -294,7 +293,13 @@ logicFun _ gs (KeyPress 'a') = pure $ hideShowHandler (not . showAllVersions) sh
|
|||||||
let newAppSettings = appSettings { showAllVersions = f appSettings , showAllTools = p appSettings }
|
let newAppSettings = appSettings { showAllVersions = f appSettings , showAllTools = p appSettings }
|
||||||
newInternalState = constructList appData newAppSettings (Just appState)
|
newInternalState = constructList appData newAppSettings (Just appState)
|
||||||
in BrickState appData newAppSettings newInternalState appKeys appQuit appRestart appMoreInput
|
in BrickState appData newAppSettings newInternalState appKeys appQuit appRestart appMoreInput
|
||||||
logicFun _ gs (KeyPress c) = pure $ (unsafePerformIO $ writeFile "key" $ show c) `seq` gs
|
|
||||||
|
-- windows powershell
|
||||||
|
logicFun _ gs@BrickState{ appState = s' } (KeyPress 'P') = pure gs { appMoreInput = Nothing, appState = moveCursor 1 s' Down }
|
||||||
|
logicFun _ gs@BrickState{ appState = s' } (KeyPress 'H') = pure gs { appMoreInput = Nothing, appState = moveCursor 1 s' Up }
|
||||||
|
|
||||||
|
logicFun _ gs Tick = pure gs
|
||||||
|
logicFun _ gs (KeyPress _) = pure gs
|
||||||
|
|
||||||
withIOAction :: (BrickState
|
withIOAction :: (BrickState
|
||||||
-> (Int, ListResult)
|
-> (Int, ListResult)
|
||||||
|
Loading…
Reference in New Issue
Block a user