Ticket #106 (closed defect: fixed)
Do not insert escape codes for unrecognised commands
|Reported by:||duncan||Owned by:||judah|
Currently for key combinations that haskeline does not recognise as mapping to a specific command, it inserts the raw escape characters. I can't see any use case where that is desirable behaviour. For example:
$ ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package ffi-1.0 ... linking ... done. Prelude> 1;5C1;5D
(for the unrecognised key combo ctl-left ctl-right)
The bug here is not that this combo is not recognised, but that it does something surprising and counterproductive.
Unrecognised commands should either be ignored completely or they should elicit some explicit behaviour to indicate they are unrecognised. For example readline beeps/flashes the window when you go left when already at the beginning of the buffer. In that readline situation it's a recognised command that is inapplicable in the context; using the same behaviour for unrecognised commands seems sensible.