anchor.diff:              | Forward = 1
               | Backward = 2
   
  -        type Handler(cmd : Command, cki : ConsoleKeyInfo, h : unit -> unit) =
  +        type Handler(cmd : Command, keyInfo : ConsoleKeyInfo, h : unit -> unit) =
               member val HandledCommand = cmd
  -            member val CKI = cki
  +            member val KeyInfo = keyInfo
               member val KeyHandler = h
   
               new(cmd : Command, key, h : unit -> unit) = Handler(cmd, new ConsoleKeyInfo((char) 0, key, false, false, false), h)
  
positive.code:                             x.SetPrompt (specified_prompt)
                          | _ -> ()
                     
                      else if (cki.KeyChar <> (char) 0) then
                          x.HandleChar (cki.KeyChar)
                   
              member private x.InitText (initial:string) =
                  text <- new StringBuilder (initial)
  
negative.code:                 | Some(_) -> x.SearchAppend (c)
                  | None -> x.InsertChar (c)
  
              let readKeyWithEscMeaningAlt () =
                  let key = Console.ReadKey (true)
                  if key.Key = ConsoleKey.Escape then
                      (Console.ReadKey (true), ConsoleModifiers.Alt)
                  else
                      (key, key.Modifiers)
  
              member private x.EditLoop () =
                  while not done_editing do
                      let (newInput, modifier) = readKeyWithEscMeaningAlt ()
                 
                      let mutable handled = false;
                      
                      let mutable handler_index = 0
                      while handler_index < handlers.Length && not handled do
                          let handler = handlers.[handler_index]
                          let handlerKeyInfo = handler.KeyInfo;
  
                          if handlerKeyInfo.Key = newInput.Key && handlerKeyInfo.Modifiers = modifier then
                              handled <- true
                              handler.KeyHandler ()
                              last_command <- handler.HandledCommand
                          else if handlerKeyInfo.KeyChar = newInput.KeyChar && handlerKeyInfo.Key = ConsoleKey.Zoom then
                              handled <- true
                              handler.KeyHandler ()
                              last_command <- handler.HandledCommand
  