Commit f41a7502 authored by judah's avatar judah
Browse files

Merge pull request #12 from philipdexter/master

Fix TODO: messageState param not needed anymore
parents bf1a30ff e18a11fa
......@@ -85,7 +85,7 @@ askFirst :: Monad m => Prefs -> Int -> CmdM m ()
-> CmdM m ()
askFirst prefs n cmd
| maybe False (< n) (completionPromptLimit prefs) = do
_ <- setState (Message () $ "Display all " ++ show n
_ <- setState (Message $ "Display all " ++ show n
++ " possibilities? (y or n)")
keyChoiceCmdM [
simpleChar 'y' +> cmd
......@@ -96,7 +96,7 @@ askFirst prefs n cmd
pageCompletions :: MonadReader Layout m => [String] -> CmdM m ()
pageCompletions [] = return ()
pageCompletions wws@(w:ws) = do
_ <- setState $ Message () "----More----"
_ <- setState $ Message "----More----"
keyChoiceCmdM [
simpleChar '\n' +> oneLine
, simpleKey DownKey +> oneLine
......
......@@ -356,10 +356,9 @@ applyCmdArg :: (InsertMode -> InsertMode) -> ArgMode CommandMode -> CommandMode
applyCmdArg f am = withCommandMode (repeatN (arg am) f) (argState am)
---------------
-- TODO: messageState param not needed anymore.
data Message s = Message {messageState :: s, messageText :: String}
newtype Message = Message {messageText :: String}
instance LineState (Message s) where
instance LineState Message where
beforeCursor _ = stringToGraphemes . messageText
afterCursor _ = []
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment