diff options
| author | tv <tv@shackspace.de> | 2014-07-28 03:19:32 +0200 | 
|---|---|---|
| committer | tv <tv@shackspace.de> | 2014-07-28 03:19:32 +0200 | 
| commit | e5e693b69e523bac9eff3a76b901e25ab8897e09 (patch) | |
| tree | 63c2ccc849b18e29837836b6ae85cab1d6b9e2e8 | |
| parent | 014d7a59d6522febf639e3a0f3801271e9aec4ab (diff) | |
rm obsolete commands Insert*{Verbatim,ChangeMode}
| -rw-r--r-- | Main.hs | 18 | 
1 files changed, 2 insertions, 16 deletions
| @@ -114,8 +114,6 @@ uiThread modeRef lock = do  data Command    = AlertBadInput String    | InsertString String -  | InsertNextCharVerbatim -  | InsertStringThenChangeMode String Mode    | KillLastWord    | KillLastChar    | KillNextChar @@ -211,24 +209,12 @@ execCommand (MotionCommand x) = do        when (null $ snd $ buffer q) $          modifyBuffer (gotoLeft 1) -  execCommand (ChangeMode m) =      modify $ \ q -> q { mode = m }  execCommand (InsertString s) =      modifyBuffer (insertString s) -execCommand (InsertStringThenChangeMode s m) = -    modify $ \ q -> q -      { mode = m -      , buffer = insertString s (buffer q) -      } - -execCommand InsertNextCharVerbatim = -    modify $ \ q -> q -      { mode = VerbatimMode -      } -  execCommand ExecuteInputBuffer = do      b <- gets buffer      tell [ "input: <" ++ (concat $ map (reform 32) $ showBuffer b) ++ ">" ] @@ -383,7 +369,7 @@ imap =    , ("\x1b[3~", KillNextChar)    , ("\x1b[C", MotionCommand $ GotoRight 1)    , ("\x1b[D", MotionCommand $ GotoLeft 1) -  , ("\x16", InsertNextCharVerbatim) -- ^V +  , ("\x16", ChangeMode VerbatimMode) -- ^V    , ("\x17", KillLastWord) -- ^W    , ("\x0a", ExecuteInputBuffer)    , ("\x7f", KillLastChar) -- Delete @@ -512,7 +498,7 @@ getCommandXXX keymap defCmd = do  verbatimKeymap :: IO Command  verbatimKeymap = do    c <- getChar -  return $ InsertStringThenChangeMode [c] NormalMode +  return $ InsertString [c] <> ChangeMode InsertMode  -- TODO Control.Monad.whenLeft | 
