anchor.diff:  
               let mutable state = makeGlobalState name histsize
   
  -            // The string being searched for
  -            let mutable search : string = null
  -            let mutable last_search : string = null
  -
  -            // whether we are searching (-1= reverse; 0 = no; 1 = forward)
  -            let mutable searching : SearchDirection option = None
  -
  -            // The position where we found the match.
  -            let mutable match_at : int = 0
  +            let mutable searchState : SearchState option = None
  +            let mutable previousSearch : string option = None
           
               // Used to implement the Kill semantics (multiple Alt-Ds accumulate)
               let mutable last_command : Command = new Command()
  
positive.code:                 AutoCompleteEvent = None
              }
  
          type LineEditor (name : string option, histsize : int) as x =
              // The text being edited.
              let mutable text = new StringBuilder ()
  
negative.code:                 x.ForceCursor (cursor)
         
              member public x.Edit prompt initial =
                  edit_thread <- Thread.CurrentThread
                  searchState <- None
                  let cancelHandler = new ConsoleCancelEventHandler(x.InterruptEdit)
                  Console.CancelKeyPress.AddHandler cancelHandler
              
  