From d59175ab186d2c8d63ae75d4a13cad91a1933c4d Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 28 Jul 2014 00:28:58 +0200 Subject: purge UnboundSequence & co. --- Main.hs | 79 +---------------------------------------------------------------- 1 file changed, 1 insertion(+), 78 deletions(-) (limited to 'Main.hs') diff --git a/Main.hs b/Main.hs index 2dccd90..a64ea2d 100644 --- a/Main.hs +++ b/Main.hs @@ -110,7 +110,6 @@ data Command | KillLastChar | KillNextChar | ExecuteInputBuffer - | UnboundSequence String String | MotionCommand LeftRightMotion | ChangeMode Mode -- TODO Move Count Motion @@ -127,8 +126,7 @@ instance Monoid Command where data ExecError - = UnboundSequenceError String String - | UnhandledInputError String + = UnhandledInputError String | OtherError String instance Error ExecError where @@ -138,9 +136,6 @@ prettyError :: ExecError -> String prettyError e = rec e where color cc s = "\x1b[" ++ cc ++ "m" ++ s ++ "\x1b[m" - rec (UnboundSequenceError s n) = - color "31" $ "unbound sequence: <" ++ (pp "31;1" s) ++ "\x1b[;31m> " - ++ (pp "31;1" n) rec (UnhandledInputError s) = color "31" $ "unhandled input: <" ++ (pp "31;1" s) ++ "\x1b[;31m>" @@ -243,9 +238,6 @@ execCommand KillLastWord = do execCommand (AlertBadInput s) = throwError (UnhandledInputError s) -execCommand (UnboundSequence s n) = - throwError (UnboundSequenceError s n) - execCommand (Combine c1 c2) = do q0 <- get @@ -363,7 +355,6 @@ nmap = , ("w", MotionCommand $ WordsForward 1) , ("\x0a", ExecuteInputBuffer <> ChangeMode InsertMode) ] - ++ [unboundSequence "\x1b" ""] imap = @@ -381,74 +372,6 @@ imap = , ("\x1bOc", MotionCommand $ WordsForward 1) , ("\x1bOd", MotionCommand $ WordsBackward 1) ] - ++ [unboundSequence "\x1b[2~" ""] - ++ [unboundSequence "\x1b[5~" ""] -- page up - ++ [unboundSequence "\x1b[6~" ""] -- page dn - ++ [unboundSequence "\x1b[7~" ""] - ++ [unboundSequence "\x1b[8~" ""] - ++ [unboundSequence "\x1b[2$" ""] - ++ [unboundSequence "\x1b[5$" ""] -- page up - ++ [unboundSequence "\x1b[6$" ""] -- page dn - ++ [unboundSequence "\x1b[7$" ""] - ++ [unboundSequence "\x1b[8$" ""] - ++ [unboundSequence "\x1b\x1b[2$" ""] - ++ [unboundSequence "\x1b\x1b[5$" ""] -- page up - ++ [unboundSequence "\x1b\x1b[6$" ""] -- page dn - ++ [unboundSequence "\x1b\x1b[7$" ""] - ++ [unboundSequence "\x1b\x1b[8$" ""] - ++ [unboundSequence "\x1b\x1b[A" ""] - ++ [unboundSequence "\x1b\x1b[B" ""] - ++ [unboundSequence "\x1b\x1b[C" ""] - ++ [unboundSequence "\x1b\x1b[D" ""] - ++ [unboundSequence "\x1b\x1b[a" ""] - ++ [unboundSequence "\x1b\x1b[b" ""] - ++ [unboundSequence "\x1b\x1b[c" ""] - ++ [unboundSequence "\x1b\x1b[d" ""] - ++ [unboundSequence "\x1b[a" ""] - ++ [unboundSequence "\x1b[b" ""] - ++ [unboundSequence "\x1b[c" ""] - ++ [unboundSequence "\x1b[d" ""] - ++ [unboundSequence "\x1bOa" ""] - ++ [unboundSequence "\x1bOb" ""] - ++ [unboundSequence "\x1bOc" ""] - ++ [unboundSequence "\x1bOd" ""] - ++ [unboundSequence "\x1b\x1bOa" ""] - ++ [unboundSequence "\x1b\x1bOb" ""] - ++ [unboundSequence "\x1b\x1bOc" ""] - ++ [unboundSequence "\x1b\x1bOd" ""] - ++ [unboundSequence "\x1b[11~" ""] - ++ [unboundSequence "\x1b[12~" ""] - ++ [unboundSequence "\x1b[13~" ""] - ++ [unboundSequence "\x1b[14~" ""] - ++ [unboundSequence "\x1b[15~" ""] - ++ [unboundSequence "\x1b[17~" ""] - ++ [unboundSequence "\x1b[18~" ""] - ++ [unboundSequence "\x1b[19~" ""] - ++ [unboundSequence "\x1b[20~" ""] - ++ [unboundSequence "\x1b[21~" ""] - ++ [unboundSequence "\x1b[23~" ""] - ++ [unboundSequence "\x1b[24~" ""] - ++ [unboundSequence "\x1b\x1b[11~" ""] - ++ [unboundSequence "\x1b\x1b[12~" ""] - ++ [unboundSequence "\x1b\x1b[13~" ""] - ++ [unboundSequence "\x1b\x1b[14~" ""] - ++ [unboundSequence "\x1b\x1b[15~" ""] - ++ [unboundSequence "\x1b\x1b[17~" ""] - ++ [unboundSequence "\x1b\x1b[18~" ""] - ++ [unboundSequence "\x1b\x1b[19~" ""] - ++ [unboundSequence "\x1b\x1b[20~" ""] - ++ [unboundSequence "\x1b\x1b[21~" ""] - ++ [unboundSequence "\x1b\x1b[23~" ""] - ++ [unboundSequence "\x1b\x1b[24~" ""] - - ++ [unboundSequence "\x1b\x1b[2~" ""] - ++ [unboundSequence "\x1b\x1b[3~" ""] - ++ [unboundSequence "\x1b\x7f" ""] - ++ [unboundSequence "\x1b\x0a" ""] - - -unboundSequence seq name = - (seq, UnboundSequence seq name) type Keymap = [(String, Command)] -- cgit v1.2.3